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
log, rpcServer
Constructor and Description |
---|
MiniDispatcher(RpcService rpcService,
String endpointId,
Configuration configuration,
HighAvailabilityServices highAvailabilityServices,
GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever,
BlobServer blobServer,
HeartbeatServices heartbeatServices,
JobManagerMetricGroup jobManagerMetricGroup,
String metricQueryServicePath,
ArchivedExecutionGraphStore archivedExecutionGraphStore,
JobManagerRunnerFactory jobManagerRunnerFactory,
FatalErrorHandler fatalErrorHandler,
HistoryServerArchivist historyServerArchivist,
JobGraph jobGraph,
ClusterEntrypoint.ExecutionMode executionMode) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<ApplicationStatus> |
getJobTerminationFuture() |
protected void |
jobNotFinished(JobID jobId) |
protected void |
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.
|
cancelJob, disposeSavepoint, getBlobServerPort, grantLeadership, handleError, listJobs, onAddedJobGraph, onFatalError, onRemovedJobGraph, onStart, onStop, requestClusterOverview, requestJob, requestJobStatus, requestMetricQueryServicePaths, requestMultipleJobDetails, requestOperatorBackPressureStats, requestTaskManagerMetricQueryServicePaths, rescaleJob, revokeLeadership, shutDownCluster, stopJob, triggerSavepoint
callAsyncWithoutFencing, getFencingToken, getMainThreadExecutor, getUnfencedMainThreadExecutor, runAsyncWithoutFencing, setFencingToken
callAsync, closeAsync, getAddress, getEndpointId, getHostname, getRpcService, getSelfGateway, getTerminationFuture, runAsync, scheduleRunAsync, scheduleRunAsync, start, stop, validateRunsInMainThread
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFencingToken
getAddress, getHostname
getAddress
close
public MiniDispatcher(RpcService rpcService, String endpointId, Configuration configuration, HighAvailabilityServices highAvailabilityServices, GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever, BlobServer blobServer, HeartbeatServices heartbeatServices, JobManagerMetricGroup jobManagerMetricGroup, @Nullable String metricQueryServicePath, ArchivedExecutionGraphStore archivedExecutionGraphStore, JobManagerRunnerFactory jobManagerRunnerFactory, FatalErrorHandler fatalErrorHandler, HistoryServerArchivist historyServerArchivist, JobGraph jobGraph, ClusterEntrypoint.ExecutionMode executionMode) throws Exception
Exception
public CompletableFuture<ApplicationStatus> getJobTerminationFuture()
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 finishedprotected void jobReachedGloballyTerminalState(ArchivedExecutionGraph archivedExecutionGraph)
jobReachedGloballyTerminalState
in class Dispatcher
protected void jobNotFinished(JobID jobId)
jobNotFinished
in class Dispatcher
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.