Search in sources :

Example 1 with NoOpDispatcherBootstrap

use of org.apache.flink.runtime.dispatcher.NoOpDispatcherBootstrap in project flink by apache.

the class DefaultDispatcherGatewayServiceFactory method create.

@Override
public AbstractDispatcherLeaderProcess.DispatcherGatewayService create(DispatcherId fencingToken, Collection<JobGraph> recoveredJobs, Collection<JobResult> recoveredDirtyJobResults, JobGraphWriter jobGraphWriter, JobResultStore jobResultStore) {
    final Dispatcher dispatcher;
    try {
        dispatcher = dispatcherFactory.createDispatcher(rpcService, fencingToken, recoveredJobs, recoveredDirtyJobResults, (dispatcherGateway, scheduledExecutor, errorHandler) -> new NoOpDispatcherBootstrap(), PartialDispatcherServicesWithJobPersistenceComponents.from(partialDispatcherServices, jobGraphWriter, jobResultStore));
    } catch (Exception e) {
        throw new FlinkRuntimeException("Could not create the Dispatcher rpc endpoint.", e);
    }
    dispatcher.start();
    return DefaultDispatcherGatewayService.from(dispatcher);
}
Also used : DispatcherId(org.apache.flink.runtime.dispatcher.DispatcherId) Dispatcher(org.apache.flink.runtime.dispatcher.Dispatcher) PartialDispatcherServices(org.apache.flink.runtime.dispatcher.PartialDispatcherServices) FlinkRuntimeException(org.apache.flink.util.FlinkRuntimeException) PartialDispatcherServicesWithJobPersistenceComponents(org.apache.flink.runtime.dispatcher.PartialDispatcherServicesWithJobPersistenceComponents) Collection(java.util.Collection) JobGraph(org.apache.flink.runtime.jobgraph.JobGraph) JobResult(org.apache.flink.runtime.jobmaster.JobResult) RpcService(org.apache.flink.runtime.rpc.RpcService) NoOpDispatcherBootstrap(org.apache.flink.runtime.dispatcher.NoOpDispatcherBootstrap) DispatcherFactory(org.apache.flink.runtime.dispatcher.DispatcherFactory) JobResultStore(org.apache.flink.runtime.highavailability.JobResultStore) JobGraphWriter(org.apache.flink.runtime.jobmanager.JobGraphWriter) NoOpDispatcherBootstrap(org.apache.flink.runtime.dispatcher.NoOpDispatcherBootstrap) FlinkRuntimeException(org.apache.flink.util.FlinkRuntimeException) Dispatcher(org.apache.flink.runtime.dispatcher.Dispatcher) FlinkRuntimeException(org.apache.flink.util.FlinkRuntimeException)

Aggregations

Collection (java.util.Collection)1 Dispatcher (org.apache.flink.runtime.dispatcher.Dispatcher)1 DispatcherFactory (org.apache.flink.runtime.dispatcher.DispatcherFactory)1 DispatcherId (org.apache.flink.runtime.dispatcher.DispatcherId)1 NoOpDispatcherBootstrap (org.apache.flink.runtime.dispatcher.NoOpDispatcherBootstrap)1 PartialDispatcherServices (org.apache.flink.runtime.dispatcher.PartialDispatcherServices)1 PartialDispatcherServicesWithJobPersistenceComponents (org.apache.flink.runtime.dispatcher.PartialDispatcherServicesWithJobPersistenceComponents)1 JobResultStore (org.apache.flink.runtime.highavailability.JobResultStore)1 JobGraph (org.apache.flink.runtime.jobgraph.JobGraph)1 JobGraphWriter (org.apache.flink.runtime.jobmanager.JobGraphWriter)1 JobResult (org.apache.flink.runtime.jobmaster.JobResult)1 RpcService (org.apache.flink.runtime.rpc.RpcService)1 FlinkRuntimeException (org.apache.flink.util.FlinkRuntimeException)1