public class JobManagerRunner extends Object implements LeaderContender, OnCompletionActions, FatalErrorHandler
| Constructor and Description |
|---|
JobManagerRunner(ResourceID resourceId,
JobGraph jobGraph,
Configuration configuration,
RpcService rpcService,
HighAvailabilityServices haServices,
HeartbeatServices heartbeatServices,
JobManagerServices jobManagerServices,
MetricRegistry metricRegistry,
OnCompletionActions toNotifyOnComplete,
FatalErrorHandler errorHandler)
Exceptions that occur while creating the JobManager or JobManagerRunner are directly
thrown and not reported to the given
FatalErrorHandler. |
JobManagerRunner(ResourceID resourceId,
JobGraph jobGraph,
Configuration configuration,
RpcService rpcService,
HighAvailabilityServices haServices,
HeartbeatServices heartbeatServices,
MetricRegistry metricRegistry,
OnCompletionActions toNotifyOnComplete,
FatalErrorHandler errorHandler) |
JobManagerRunner(ResourceID resourceId,
JobGraph jobGraph,
Configuration configuration,
RpcService rpcService,
HighAvailabilityServices haServices,
HeartbeatServices heartbeatServices,
OnCompletionActions toNotifyOnComplete,
FatalErrorHandler errorHandler) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAddress()
Returns the address of the
LeaderContender under which other instances can connect
to it. |
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 |
jobFailed(Throwable cause)
Job completion notification triggered by JobManager
|
void |
jobFinished(JobExecutionResult result)
Job completion notification triggered by JobManager
|
void |
jobFinishedByOther()
Job completion notification triggered by self
|
void |
onFatalError(Throwable exception)
Job completion notification triggered by JobManager or self
|
void |
revokeLeadership()
Callback method which is called by the
LeaderElectionService upon revoking the
leadership of a former leader. |
void |
shutdown() |
void |
start() |
public JobManagerRunner(ResourceID resourceId, JobGraph jobGraph, Configuration configuration, RpcService rpcService, HighAvailabilityServices haServices, HeartbeatServices heartbeatServices, OnCompletionActions toNotifyOnComplete, FatalErrorHandler errorHandler) throws Exception
Exceptionpublic JobManagerRunner(ResourceID resourceId, JobGraph jobGraph, Configuration configuration, RpcService rpcService, HighAvailabilityServices haServices, HeartbeatServices heartbeatServices, MetricRegistry metricRegistry, OnCompletionActions toNotifyOnComplete, FatalErrorHandler errorHandler) throws Exception
Exceptionpublic JobManagerRunner(ResourceID resourceId, JobGraph jobGraph, Configuration configuration, RpcService rpcService, HighAvailabilityServices haServices, HeartbeatServices heartbeatServices, JobManagerServices jobManagerServices, MetricRegistry metricRegistry, OnCompletionActions toNotifyOnComplete, FatalErrorHandler errorHandler) throws Exception
Exceptions that occur while creating the JobManager or JobManagerRunner are directly
thrown and not reported to the given FatalErrorHandler.
This JobManagerRunner assumes that it owns the given JobManagerServices.
It will shut them down on error and on calls to shutdown().
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 void shutdown()
public void jobFinished(JobExecutionResult result)
jobFinished in interface OnCompletionActionspublic void jobFailed(Throwable cause)
jobFailed in interface OnCompletionActionspublic void jobFinishedByOther()
jobFinishedByOther in interface OnCompletionActionspublic void onFatalError(Throwable exception)
onFatalError in interface FatalErrorHandlerpublic 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–2017 The Apache Software Foundation. All rights reserved.