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
.
Dispatcher.ExecutionType
RpcEndpoint.MainThreadExecutor
CLIENT_ALIVENESS_CHECK_DURATION, DISPATCHER_NAME, shutDownFuture
log, rpcServer
Constructor and Description |
---|
MiniDispatcher(RpcService rpcService,
DispatcherId fencingToken,
DispatcherServices dispatcherServices,
JobGraph jobGraph,
JobResult recoveredDirtyJob,
DispatcherBootstrapFactory dispatcherBootstrapFactory,
ClusterEntrypoint.ExecutionMode executionMode) |
MiniDispatcher(RpcService rpcService,
DispatcherId fencingToken,
DispatcherServices dispatcherServices,
JobGraph jobGraph,
JobResult recoveredDirtyJob,
DispatcherBootstrapFactory dispatcherBootstrapFactory,
JobManagerRunnerRegistry jobManagerRunnerRegistry,
ResourceCleanerFactory resourceCleanerFactory,
ClusterEntrypoint.ExecutionMode executionMode) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Acknowledge> |
cancelJob(JobID jobId,
Time timeout)
Cancel the given job.
|
CompletableFuture<JobResult> |
requestJobResult(JobID jobId,
Time timeout)
Requests the
JobResult of a job specified by the given jobId. |
protected void |
runPostJobGloballyTerminated(JobID jobId,
JobStatus jobStatus) |
CompletableFuture<Acknowledge> |
submitJob(JobGraph jobGraph,
Time timeout)
Submit a job to the dispatcher.
|
deliverCoordinationRequestToCoordinator, disposeSavepoint, getBlobServerPort, getShutDownFuture, getTriggeredCheckpointStatus, getTriggeredSavepointStatus, jobReachedTerminalState, listJobs, onFatalError, onRemovedJobGraph, onStart, onStop, reportJobClientHeartbeat, requestClusterOverview, requestExecutionGraphInfo, requestJobStatus, requestMetricQueryServiceAddresses, requestMultipleJobDetails, requestTaskManagerMetricQueryServiceAddresses, requestThreadDump, shutDownCluster, shutDownCluster, stopWithSavepoint, stopWithSavepointAndGetLocation, submitFailedJob, triggerCheckpoint, triggerCheckpoint, triggerSavepoint, triggerSavepointAndGetLocation
getFencingToken
callAsync, closeAsync, getAddress, getEndpointId, getHostname, getMainThreadExecutor, getRpcService, getSelfGateway, getTerminationFuture, internalCallOnStart, internalCallOnStop, isRunning, registerResource, runAsync, scheduleRunAsync, scheduleRunAsync, start, stop, unregisterResource, validateRunsInMainThread
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFencingToken
requestJob
getAddress, getHostname
close
public MiniDispatcher(RpcService rpcService, DispatcherId fencingToken, DispatcherServices dispatcherServices, @Nullable JobGraph jobGraph, @Nullable JobResult recoveredDirtyJob, DispatcherBootstrapFactory dispatcherBootstrapFactory, ClusterEntrypoint.ExecutionMode executionMode) throws Exception
Exception
@VisibleForTesting public MiniDispatcher(RpcService rpcService, DispatcherId fencingToken, DispatcherServices dispatcherServices, @Nullable JobGraph jobGraph, @Nullable JobResult recoveredDirtyJob, DispatcherBootstrapFactory dispatcherBootstrapFactory, JobManagerRunnerRegistry jobManagerRunnerRegistry, ResourceCleanerFactory resourceCleanerFactory, 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 void runPostJobGloballyTerminated(JobID jobId, JobStatus jobStatus)
runPostJobGloballyTerminated
in class Dispatcher
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.