public class JobManagerRunner extends Object implements LeaderContender, OnCompletionActions, org.apache.flink.util.AutoCloseableAsync
| Constructor and Description |
|---|
JobManagerRunner(ResourceID resourceId,
JobGraph jobGraph,
org.apache.flink.configuration.Configuration configuration,
RpcService rpcService,
HighAvailabilityServices haServices,
HeartbeatServices heartbeatServices,
BlobServer blobServer,
JobManagerSharedServices jobManagerSharedServices,
JobManagerJobMetricGroupFactory jobManagerJobMetricGroupFactory,
FatalErrorHandler fatalErrorHandler)
Exceptions that occur while creating the JobManager or JobManagerRunner are directly
thrown and not reported to the given
FatalErrorHandler. |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
closeAsync() |
String |
getAddress()
Returns the address of the
LeaderContender under which other instances can connect
to it. |
JobGraph |
getJobGraph() |
CompletableFuture<JobMasterGateway> |
getLeaderGatewayFuture() |
CompletableFuture<ArchivedExecutionGraph> |
getResultFuture() |
void |
grantLeadership(UUID leaderSessionID)
Callback method which is called by the
LeaderElectionService upon selecting this
instance as the new leader. |
void |
handleError(Exception exception)
Callback method which is called by
LeaderElectionService in case of an error in the
service thread. |
void |
jobFinishedByOther()
Job completion notification triggered by self.
|
void |
jobMasterFailed(Throwable cause)
The
JobMaster failed while executing the job. |
void |
jobReachedGloballyTerminalState(ArchivedExecutionGraph executionGraph)
Job completion notification triggered by JobManager.
|
void |
revokeLeadership()
Callback method which is called by the
LeaderElectionService upon revoking the
leadership of a former leader. |
void |
start() |
public JobManagerRunner(ResourceID resourceId, JobGraph jobGraph, org.apache.flink.configuration.Configuration configuration, RpcService rpcService, HighAvailabilityServices haServices, HeartbeatServices heartbeatServices, BlobServer blobServer, JobManagerSharedServices jobManagerSharedServices, JobManagerJobMetricGroupFactory jobManagerJobMetricGroupFactory, FatalErrorHandler fatalErrorHandler) throws Exception
FatalErrorHandler.Exception - Thrown if the runner cannot be set up, because either one of the
required services could not be started, ot the Job could not be initialized.public CompletableFuture<JobMasterGateway> getLeaderGatewayFuture()
public JobGraph getJobGraph()
public CompletableFuture<ArchivedExecutionGraph> getResultFuture()
public CompletableFuture<Void> closeAsync()
closeAsync in interface org.apache.flink.util.AutoCloseableAsyncpublic void jobReachedGloballyTerminalState(ArchivedExecutionGraph executionGraph)
jobReachedGloballyTerminalState in interface OnCompletionActionsexecutionGraph - serializable execution graphpublic void jobFinishedByOther()
jobFinishedByOther in interface OnCompletionActionspublic void jobMasterFailed(Throwable cause)
OnCompletionActionsJobMaster failed while executing the job.jobMasterFailed in interface OnCompletionActionspublic void grantLeadership(UUID leaderSessionID)
LeaderContenderLeaderElectionService upon selecting this
instance as the new leader. The method is called with the new leader session ID.grantLeadership in interface LeaderContenderleaderSessionID - New leader session IDpublic void revokeLeadership()
LeaderContenderLeaderElectionService upon revoking the
leadership of a former leader. This might happen in case that multiple contenders have
been granted leadership.revokeLeadership in interface LeaderContenderpublic String getAddress()
LeaderContenderLeaderContender under which other instances can connect
to it.getAddress in interface LeaderContenderpublic void handleError(Exception exception)
LeaderContenderLeaderElectionService in case of an error in the
service thread.handleError in interface LeaderContenderexception - Caught exceptionCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.