public class MiniDispatcher extends Dispatcher
JobClusterEntrypoint
.
The mini dispatcher is initialized with a single JobGraph
which it runs.
Depending on the ClusterEntrypoint.ExecutionMode
, the mini dispatcher will directly
terminate after job completion if its execution mode is ClusterEntrypoint.ExecutionMode#DETACHED
.
RpcEndpoint.MainThreadExecutor
DISPATCHER_NAME, shutDownFuture
log, rpcServer
Constructor and Description |
---|
MiniDispatcher(RpcService rpcService,
DispatcherId fencingToken,
DispatcherServices dispatcherServices,
JobGraph jobGraph,
DispatcherBootstrapFactory dispatcherBootstrapFactory,
ClusterEntrypoint.ExecutionMode executionMode) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Acknowledge> |
cancelJob(JobID jobId,
Time timeout)
Cancel the given job.
|
protected org.apache.flink.runtime.dispatcher.Dispatcher.CleanupJobState |
jobNotFinished(JobID jobId) |
protected org.apache.flink.runtime.dispatcher.Dispatcher.CleanupJobState |
jobReachedGloballyTerminalState(ArchivedExecutionGraph archivedExecutionGraph) |
CompletableFuture<JobResult> |
requestJobResult(JobID jobId,
Time timeout)
Requests the
JobResult of a job specified by the given jobId. |
CompletableFuture<Acknowledge> |
submitJob(JobGraph jobGraph,
Time timeout)
Submit a job to the dispatcher.
|
deliverCoordinationRequestToCoordinator, disposeSavepoint, getBlobServerPort, getShutDownFuture, listJobs, onFatalError, onRemovedJobGraph, onStart, onStop, requestClusterOverview, requestJob, requestJobStatus, requestMetricQueryServiceAddresses, requestMultipleJobDetails, requestOperatorBackPressureStats, requestTaskManagerMetricQueryServiceAddresses, shutDownCluster, shutDownCluster, stopWithSavepoint, triggerSavepoint
setFencingToken
callAsyncWithoutFencing, getFencingToken, getMainThreadExecutor, getUnfencedMainThreadExecutor, runAsyncWithoutFencing
callAsync, closeAsync, getAddress, getEndpointId, getHostname, getRpcService, getSelfGateway, getTerminationFuture, internalCallOnStart, internalCallOnStop, isRunning, runAsync, scheduleRunAsync, scheduleRunAsync, start, stop, validateRunsInMainThread
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFencingToken
getAddress, getHostname
close
public MiniDispatcher(RpcService rpcService, DispatcherId fencingToken, DispatcherServices dispatcherServices, JobGraph jobGraph, DispatcherBootstrapFactory dispatcherBootstrapFactory, ClusterEntrypoint.ExecutionMode executionMode) throws Exception
Exception
public CompletableFuture<Acknowledge> submitJob(JobGraph jobGraph, Time timeout)
DispatcherGateway
submitJob
in interface DispatcherGateway
submitJob
in class Dispatcher
jobGraph
- JobGraph to submittimeout
- RPC timeoutpublic CompletableFuture<JobResult> requestJobResult(JobID jobId, Time timeout)
RestfulGateway
JobResult
of a job specified by the given jobId.requestJobResult
in interface RestfulGateway
requestJobResult
in class Dispatcher
jobId
- identifying the job for which to retrieve the JobResult
.timeout
- for the asynchronous operationJobResult
once the job has finishedpublic CompletableFuture<Acknowledge> cancelJob(JobID jobId, Time timeout)
RestfulGateway
cancelJob
in interface RestfulGateway
cancelJob
in class Dispatcher
jobId
- identifying the job to canceltimeout
- of the operationprotected org.apache.flink.runtime.dispatcher.Dispatcher.CleanupJobState jobReachedGloballyTerminalState(ArchivedExecutionGraph archivedExecutionGraph)
jobReachedGloballyTerminalState
in class Dispatcher
protected org.apache.flink.runtime.dispatcher.Dispatcher.CleanupJobState jobNotFinished(JobID jobId)
jobNotFinished
in class Dispatcher
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.