org.apache.flink.runtime.entrypoint.component.DispatcherResourceManagerComponentFactory Java Examples
The following examples show how to use
org.apache.flink.runtime.entrypoint.component.DispatcherResourceManagerComponentFactory.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MiniCluster.java From flink with Apache License 2.0 | 6 votes |
@VisibleForTesting protected Collection<? extends DispatcherResourceManagerComponent> createDispatcherResourceManagerComponents( Configuration configuration, RpcServiceFactory rpcServiceFactory, HighAvailabilityServices haServices, BlobServer blobServer, HeartbeatServices heartbeatServices, MetricRegistry metricRegistry, MetricQueryServiceRetriever metricQueryServiceRetriever, FatalErrorHandler fatalErrorHandler) throws Exception { DispatcherResourceManagerComponentFactory dispatcherResourceManagerComponentFactory = createDispatcherResourceManagerComponentFactory(); return Collections.singleton( dispatcherResourceManagerComponentFactory.create( configuration, ioExecutor, rpcServiceFactory.createRpcService(), haServices, blobServer, heartbeatServices, metricRegistry, new MemoryArchivedExecutionGraphStore(), metricQueryServiceRetriever, fatalErrorHandler)); }
Example #2
Source File: ClusterEntrypoint.java From flink with Apache License 2.0 | 5 votes |
private void runCluster(Configuration configuration) throws Exception { synchronized (lock) { initializeServices(configuration); // write host information into configuration configuration.setString(JobManagerOptions.ADDRESS, commonRpcService.getAddress()); configuration.setInteger(JobManagerOptions.PORT, commonRpcService.getPort()); final DispatcherResourceManagerComponentFactory<?> dispatcherResourceManagerComponentFactory = createDispatcherResourceManagerComponentFactory(configuration); clusterComponent = dispatcherResourceManagerComponentFactory.create( configuration, commonRpcService, haServices, blobServer, heartbeatServices, metricRegistry, archivedExecutionGraphStore, new RpcMetricQueryServiceRetriever(metricRegistry.getMetricQueryServiceRpcService()), this); clusterComponent.getShutDownFuture().whenComplete( (ApplicationStatus applicationStatus, Throwable throwable) -> { if (throwable != null) { shutDownAsync( ApplicationStatus.UNKNOWN, ExceptionUtils.stringifyException(throwable), false); } else { // This is the general shutdown path. If a separate more specific shutdown was // already triggered, this will do nothing shutDownAsync( applicationStatus, null, true); } }); } }
Example #3
Source File: ApplicationClusterEntryPoint.java From flink with Apache License 2.0 | 5 votes |
@Override protected DispatcherResourceManagerComponentFactory createDispatcherResourceManagerComponentFactory(final Configuration configuration) { return new DefaultDispatcherResourceManagerComponentFactory( new DefaultDispatcherRunnerFactory( ApplicationDispatcherLeaderProcessFactoryFactory .create(configuration, SessionDispatcherFactory.INSTANCE, program)), resourceManagerFactory, JobRestEndpointFactory.INSTANCE); }
Example #4
Source File: TestingMiniCluster.java From flink with Apache License 2.0 | 5 votes |
@Override protected Collection<? extends DispatcherResourceManagerComponent> createDispatcherResourceManagerComponents( Configuration configuration, RpcServiceFactory rpcServiceFactory, HighAvailabilityServices haServices, BlobServer blobServer, HeartbeatServices heartbeatServices, MetricRegistry metricRegistry, MetricQueryServiceRetriever metricQueryServiceRetriever, FatalErrorHandler fatalErrorHandler) throws Exception { DispatcherResourceManagerComponentFactory dispatcherResourceManagerComponentFactory = createDispatcherResourceManagerComponentFactory(); final List<DispatcherResourceManagerComponent> result = new ArrayList<>(numberDispatcherResourceManagerComponents); for (int i = 0; i < numberDispatcherResourceManagerComponents; i++) { result.add( dispatcherResourceManagerComponentFactory.create( configuration, getIOExecutor(), rpcServiceFactory.createRpcService(), haServices, blobServer, heartbeatServices, metricRegistry, new MemoryArchivedExecutionGraphStore(), metricQueryServiceRetriever, fatalErrorHandler)); } return result; }
Example #5
Source File: StatefulFunctionsClusterEntryPoint.java From flink-statefun with Apache License 2.0 | 5 votes |
@Override protected DispatcherResourceManagerComponentFactory createDispatcherResourceManagerComponentFactory(Configuration configuration) { return DefaultDispatcherResourceManagerComponentFactory.createJobComponentFactory( StandaloneResourceManagerFactory.INSTANCE, new StatefulFunctionsJobGraphRetriever( jobId, savepointRestoreSettings, parallelism, programArguments)); }
Example #6
Source File: StatefulFunctionsClusterEntryPoint.java From stateful-functions with Apache License 2.0 | 5 votes |
@Override protected DispatcherResourceManagerComponentFactory createDispatcherResourceManagerComponentFactory(Configuration configuration) { return DefaultDispatcherResourceManagerComponentFactory.createJobComponentFactory( StandaloneResourceManagerFactory.INSTANCE, new StatefulFunctionsJobGraphRetriever(jobId, savepointRestoreSettings, programArguments)); }
Example #7
Source File: MesosSessionClusterEntrypoint.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override protected DispatcherResourceManagerComponentFactory<?> createDispatcherResourceManagerComponentFactory(Configuration configuration) { return new SessionDispatcherResourceManagerComponentFactory( new MesosResourceManagerFactory( mesosServices, mesosConfig, taskManagerParameters, taskManagerContainerSpec)); }
Example #8
Source File: MesosJobClusterEntrypoint.java From flink with Apache License 2.0 | 5 votes |
@Override protected DispatcherResourceManagerComponentFactory<?> createDispatcherResourceManagerComponentFactory(Configuration configuration) { return new JobDispatcherResourceManagerComponentFactory( new MesosResourceManagerFactory( mesosServices, schedulerConfiguration, taskManagerParameters, taskManagerContainerSpec), FileJobGraphRetriever.createFrom(configuration)); }
Example #9
Source File: MesosJobClusterEntrypoint.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override protected DispatcherResourceManagerComponentFactory<?> createDispatcherResourceManagerComponentFactory(Configuration configuration) { return new JobDispatcherResourceManagerComponentFactory( new MesosResourceManagerFactory( mesosServices, schedulerConfiguration, taskManagerParameters, taskManagerContainerSpec), FileJobGraphRetriever.createFrom(configuration)); }
Example #10
Source File: MesosSessionClusterEntrypoint.java From flink with Apache License 2.0 | 5 votes |
@Override protected DispatcherResourceManagerComponentFactory<?> createDispatcherResourceManagerComponentFactory(Configuration configuration) { return new SessionDispatcherResourceManagerComponentFactory( new MesosResourceManagerFactory( mesosServices, mesosConfig, taskManagerParameters, taskManagerContainerSpec)); }
Example #11
Source File: YarnJobClusterEntrypoint.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override protected DispatcherResourceManagerComponentFactory<?> createDispatcherResourceManagerComponentFactory(Configuration configuration) { return new JobDispatcherResourceManagerComponentFactory( YarnResourceManagerFactory.INSTANCE, FileJobGraphRetriever.createFrom(configuration)); }
Example #12
Source File: StandaloneJobClusterEntryPoint.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override protected DispatcherResourceManagerComponentFactory<?> createDispatcherResourceManagerComponentFactory(Configuration configuration) { return new JobDispatcherResourceManagerComponentFactory( StandaloneResourceManagerFactory.INSTANCE, new ClassPathJobGraphRetriever(jobId, savepointRestoreSettings, programArguments, jobClassName)); }
Example #13
Source File: ClusterEntrypoint.java From flink with Apache License 2.0 | 4 votes |
private void runCluster(Configuration configuration, PluginManager pluginManager) throws Exception { synchronized (lock) { initializeServices(configuration, pluginManager); // write host information into configuration configuration.setString(JobManagerOptions.ADDRESS, commonRpcService.getAddress()); configuration.setInteger(JobManagerOptions.PORT, commonRpcService.getPort()); final DispatcherResourceManagerComponentFactory dispatcherResourceManagerComponentFactory = createDispatcherResourceManagerComponentFactory(configuration); clusterComponent = dispatcherResourceManagerComponentFactory.create( configuration, ioExecutor, commonRpcService, haServices, blobServer, heartbeatServices, metricRegistry, archivedExecutionGraphStore, new RpcMetricQueryServiceRetriever(metricRegistry.getMetricQueryServiceRpcService()), this); clusterComponent.getShutDownFuture().whenComplete( (ApplicationStatus applicationStatus, Throwable throwable) -> { if (throwable != null) { shutDownAsync( ApplicationStatus.UNKNOWN, ExceptionUtils.stringifyException(throwable), false); } else { // This is the general shutdown path. If a separate more specific shutdown was // already triggered, this will do nothing shutDownAsync( applicationStatus, null, true); } }); } }
Example #14
Source File: MiniCluster.java From flink with Apache License 2.0 | 4 votes |
@Nonnull DispatcherResourceManagerComponentFactory createDispatcherResourceManagerComponentFactory() { return DefaultDispatcherResourceManagerComponentFactory.createSessionComponentFactory(StandaloneResourceManagerFactory.getInstance()); }
Example #15
Source File: YarnSessionClusterEntrypoint.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override protected DispatcherResourceManagerComponentFactory<?> createDispatcherResourceManagerComponentFactory(Configuration configuration) { return new SessionDispatcherResourceManagerComponentFactory(YarnResourceManagerFactory.INSTANCE); }
Example #16
Source File: YarnSessionClusterEntrypoint.java From flink with Apache License 2.0 | 4 votes |
@Override protected DispatcherResourceManagerComponentFactory createDispatcherResourceManagerComponentFactory(Configuration configuration) { return DefaultDispatcherResourceManagerComponentFactory.createSessionComponentFactory(YarnResourceManagerFactory.getInstance()); }
Example #17
Source File: KubernetesSessionClusterEntrypoint.java From flink with Apache License 2.0 | 4 votes |
@Override protected DispatcherResourceManagerComponentFactory createDispatcherResourceManagerComponentFactory(Configuration configuration) { return DefaultDispatcherResourceManagerComponentFactory.createSessionComponentFactory( KubernetesResourceManagerFactory.getInstance()); }
Example #18
Source File: ClusterEntrypoint.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
private void runCluster(Configuration configuration) throws Exception { synchronized (lock) { initializeServices(configuration); // write host information into configuration configuration.setString(JobManagerOptions.ADDRESS, commonRpcService.getAddress()); configuration.setInteger(JobManagerOptions.PORT, commonRpcService.getPort()); final DispatcherResourceManagerComponentFactory<?> dispatcherResourceManagerComponentFactory = createDispatcherResourceManagerComponentFactory(configuration); clusterComponent = dispatcherResourceManagerComponentFactory.create( configuration, commonRpcService, haServices, blobServer, heartbeatServices, metricRegistry, archivedExecutionGraphStore, new AkkaQueryServiceRetriever( metricQueryServiceActorSystem, Time.milliseconds(configuration.getLong(WebOptions.TIMEOUT))), this); clusterComponent.getShutDownFuture().whenComplete( (ApplicationStatus applicationStatus, Throwable throwable) -> { if (throwable != null) { shutDownAsync( ApplicationStatus.UNKNOWN, ExceptionUtils.stringifyException(throwable), false); } else { // This is the general shutdown path. If a separate more specific shutdown was // already triggered, this will do nothing shutDownAsync( applicationStatus, null, true); } }); } }
Example #19
Source File: StandaloneSessionClusterEntrypoint.java From flink with Apache License 2.0 | 4 votes |
@Override protected DispatcherResourceManagerComponentFactory<?> createDispatcherResourceManagerComponentFactory(Configuration configuration) { return new SessionDispatcherResourceManagerComponentFactory(StandaloneResourceManagerFactory.INSTANCE); }
Example #20
Source File: YarnJobClusterEntrypoint.java From flink with Apache License 2.0 | 4 votes |
@Override protected DispatcherResourceManagerComponentFactory<?> createDispatcherResourceManagerComponentFactory(Configuration configuration) { return new JobDispatcherResourceManagerComponentFactory( YarnResourceManagerFactory.getInstance(), FileJobGraphRetriever.createFrom(configuration)); }
Example #21
Source File: YarnSessionClusterEntrypoint.java From flink with Apache License 2.0 | 4 votes |
@Override protected DispatcherResourceManagerComponentFactory<?> createDispatcherResourceManagerComponentFactory(Configuration configuration) { return new SessionDispatcherResourceManagerComponentFactory(YarnResourceManagerFactory.getInstance()); }
Example #22
Source File: StandaloneJobClusterEntryPoint.java From flink with Apache License 2.0 | 4 votes |
@Override protected DispatcherResourceManagerComponentFactory<?> createDispatcherResourceManagerComponentFactory(Configuration configuration) { return new JobDispatcherResourceManagerComponentFactory( StandaloneResourceManagerFactory.INSTANCE, new ClassPathJobGraphRetriever(jobId, savepointRestoreSettings, programArguments, jobClassName)); }
Example #23
Source File: StandaloneSessionClusterEntrypoint.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override protected DispatcherResourceManagerComponentFactory<?> createDispatcherResourceManagerComponentFactory(Configuration configuration) { return new SessionDispatcherResourceManagerComponentFactory(StandaloneResourceManagerFactory.INSTANCE); }
Example #24
Source File: ClusterEntrypoint.java From flink with Apache License 2.0 | votes |
protected abstract DispatcherResourceManagerComponentFactory<?> createDispatcherResourceManagerComponentFactory(Configuration configuration);
Example #25
Source File: ClusterEntrypoint.java From Flink-CEPplus with Apache License 2.0 | votes |
protected abstract DispatcherResourceManagerComponentFactory<?> createDispatcherResourceManagerComponentFactory(Configuration configuration);
Example #26
Source File: ClusterEntrypoint.java From flink with Apache License 2.0 | votes |
protected abstract DispatcherResourceManagerComponentFactory createDispatcherResourceManagerComponentFactory(Configuration configuration) throws IOException;