public class DefaultJobMasterServiceProcess extends Object implements JobMasterServiceProcess, OnCompletionActions
JobMasterServiceProcess which is responsible for creating and running a JobMasterService. The process is responsible for receiving the signals from the JobMasterService and to create the respective JobManagerRunnerResult from it.
The JobMasterService can be created asynchronously and the creation can also fail.
That is why the process needs to observe the creation operation and complete the resultFuture with an initialization failure.
The resultFuture can be completed with the following values:
JobManagerRunnerResult to signal an initialization failure of the JobMasterService or the completion of a job
JobNotFinishedException to signal that the job has not been completed by the JobMasterService
Exception to signal an unexpected failure
JobMasterServiceProcess.WaitingForLeadership| 构造器和说明 |
|---|
DefaultJobMasterServiceProcess(org.apache.flink.api.common.JobID jobId,
UUID leaderSessionId,
JobMasterServiceFactory jobMasterServiceFactory,
java.util.function.Function<Throwable,ArchivedExecutionGraph> failedArchivedExecutionGraphFactory) |
| 限定符和类型 | 方法和说明 |
|---|---|
CompletableFuture<Void> |
closeAsync() |
CompletableFuture<JobMasterGateway> |
getJobMasterGatewayFuture()
Future which is completed with the
JobMasterGateway once the JobMasterService
has been created. |
CompletableFuture<String> |
getLeaderAddressFuture()
Future which is completed with the
JobMasterService address once it is created. |
UUID |
getLeaderSessionId()
The leader session id of this process.
|
CompletableFuture<JobManagerRunnerResult> |
getResultFuture()
Future which is completed with the result of job execution.
|
boolean |
isInitializedAndRunning()
True iff the
JobMasterService has been initialized and is running. |
void |
jobMasterFailed(Throwable cause)
The
JobMaster failed while executing the job. |
void |
jobReachedGloballyTerminalState(ExecutionGraphInfo executionGraphInfo)
Job reached a globally terminal state.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwaitingForLeadershippublic DefaultJobMasterServiceProcess(org.apache.flink.api.common.JobID jobId,
UUID leaderSessionId,
JobMasterServiceFactory jobMasterServiceFactory,
java.util.function.Function<Throwable,ArchivedExecutionGraph> failedArchivedExecutionGraphFactory)
public CompletableFuture<Void> closeAsync()
closeAsync 在接口中 org.apache.flink.util.AutoCloseableAsyncpublic UUID getLeaderSessionId()
JobMasterServiceProcessgetLeaderSessionId 在接口中 JobMasterServiceProcesspublic boolean isInitializedAndRunning()
JobMasterServiceProcessJobMasterService has been initialized and is running.public CompletableFuture<JobMasterGateway> getJobMasterGatewayFuture()
JobMasterServiceProcessJobMasterGateway once the JobMasterService
has been created. Upon closing of the process, this future is completed exceptionally if it
is still uncompleted.public CompletableFuture<JobManagerRunnerResult> getResultFuture()
JobMasterServiceProcessJobManagerRunnerResult, JobNotFinishedException if the job was not finished
or an Throwable if an unexpected failure occurs. Upon closing of the process, this
future is completed exceptionally with JobNotFinishedException.getResultFuture 在接口中 JobMasterServiceProcesspublic CompletableFuture<String> getLeaderAddressFuture()
JobMasterServiceProcessJobMasterService address once it is created.public void jobReachedGloballyTerminalState(ExecutionGraphInfo executionGraphInfo)
OnCompletionActionsjobReachedGloballyTerminalState 在接口中 OnCompletionActionsexecutionGraphInfo - contains information about the terminated jobpublic void jobMasterFailed(Throwable cause)
OnCompletionActionsJobMaster failed while executing the job.jobMasterFailed 在接口中 OnCompletionActionsCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.