public abstract class Dispatcher extends org.apache.flink.runtime.rpc.PermanentlyFencedRpcEndpoint<DispatcherId> implements DispatcherGateway
| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
Dispatcher.ExecutionType
Enum to distinguish between initial job submission and re-submission for recovery.
|
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DISPATCHER_NAME |
protected CompletableFuture<ApplicationStatus> |
shutDownFuture |
| 构造器和说明 |
|---|
Dispatcher(org.apache.flink.runtime.rpc.RpcService rpcService,
DispatcherId fencingToken,
Collection<JobGraph> recoveredJobs,
DispatcherBootstrapFactory dispatcherBootstrapFactory,
DispatcherServices dispatcherServices) |
| 限定符和类型 | 方法和说明 |
|---|---|
CompletableFuture<Acknowledge> |
cancelJob(org.apache.flink.api.common.JobID jobId,
org.apache.flink.api.common.time.Time timeout)
Cancel the given job.
|
CompletableFuture<CoordinationResponse> |
deliverCoordinationRequestToCoordinator(org.apache.flink.api.common.JobID jobId,
OperatorID operatorId,
org.apache.flink.util.SerializedValue<CoordinationRequest> serializedRequest,
org.apache.flink.api.common.time.Time timeout)
Deliver a coordination request to a specified coordinator and return the response.
|
CompletableFuture<Acknowledge> |
disposeSavepoint(String savepointPath,
org.apache.flink.api.common.time.Time timeout)
Dispose the given savepoint.
|
CompletableFuture<Integer> |
getBlobServerPort(org.apache.flink.api.common.time.Time timeout)
Returns the port of the blob server.
|
CompletableFuture<ApplicationStatus> |
getShutDownFuture() |
protected CompletableFuture<org.apache.flink.runtime.dispatcher.Dispatcher.CleanupJobState> |
jobReachedTerminalState(ExecutionGraphInfo executionGraphInfo) |
CompletableFuture<Collection<org.apache.flink.api.common.JobID>> |
listJobs(org.apache.flink.api.common.time.Time timeout)
List the current set of submitted jobs.
|
protected void |
onFatalError(Throwable throwable) |
CompletableFuture<Void> |
onRemovedJobGraph(org.apache.flink.api.common.JobID jobId) |
void |
onStart() |
CompletableFuture<Void> |
onStop() |
CompletableFuture<ClusterOverview> |
requestClusterOverview(org.apache.flink.api.common.time.Time timeout)
Requests the cluster status overview.
|
CompletableFuture<ExecutionGraphInfo> |
requestExecutionGraphInfo(org.apache.flink.api.common.JobID jobId,
org.apache.flink.api.common.time.Time timeout)
Requests the
ExecutionGraphInfo containing additional information besides the ArchivedExecutionGraph. |
CompletableFuture<JobResult> |
requestJobResult(org.apache.flink.api.common.JobID jobId,
org.apache.flink.api.common.time.Time timeout)
Requests the
JobResult of a job specified by the given jobId. |
CompletableFuture<org.apache.flink.api.common.JobStatus> |
requestJobStatus(org.apache.flink.api.common.JobID jobId,
org.apache.flink.api.common.time.Time timeout)
Request the
JobStatus of the given job. |
CompletableFuture<Collection<String>> |
requestMetricQueryServiceAddresses(org.apache.flink.api.common.time.Time timeout)
Requests the addresses of the
MetricQueryService to query. |
CompletableFuture<MultipleJobsDetails> |
requestMultipleJobDetails(org.apache.flink.api.common.time.Time timeout)
Requests job details currently being executed on the Flink cluster.
|
CompletableFuture<Collection<org.apache.flink.api.java.tuple.Tuple2<ResourceID,String>>> |
requestTaskManagerMetricQueryServiceAddresses(org.apache.flink.api.common.time.Time timeout)
Requests the addresses for the TaskManagers'
MetricQueryService to query. |
CompletableFuture<Acknowledge> |
shutDownCluster() |
CompletableFuture<Acknowledge> |
shutDownCluster(ApplicationStatus applicationStatus) |
CompletableFuture<String> |
stopWithSavepoint(org.apache.flink.api.common.JobID jobId,
String targetDirectory,
boolean terminate,
org.apache.flink.api.common.time.Time timeout)
Stops the job with a savepoint.
|
CompletableFuture<Acknowledge> |
submitJob(JobGraph jobGraph,
org.apache.flink.api.common.time.Time timeout)
Submit a job to the dispatcher.
|
CompletableFuture<String> |
triggerSavepoint(org.apache.flink.api.common.JobID jobId,
String targetDirectory,
boolean cancelJob,
org.apache.flink.api.common.time.Time timeout)
Triggers a savepoint with the given savepoint directory as a target.
|
callAsyncWithoutFencing, getFencingToken, getMainThreadExecutor, getUnfencedMainThreadExecutor, runAsyncWithoutFencingcallAsync, closeAsync, getAddress, getEndpointId, getHostname, getRpcService, getSelfGateway, getTerminationFuture, internalCallOnStart, internalCallOnStop, isRunning, runAsync, scheduleRunAsync, scheduleRunAsync, start, stop, validateRunsInMainThreadclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrequestJobprotected final CompletableFuture<ApplicationStatus> shutDownFuture
public Dispatcher(org.apache.flink.runtime.rpc.RpcService rpcService,
DispatcherId fencingToken,
Collection<JobGraph> recoveredJobs,
DispatcherBootstrapFactory dispatcherBootstrapFactory,
DispatcherServices dispatcherServices)
throws Exception
Exceptionpublic CompletableFuture<ApplicationStatus> getShutDownFuture()
public void onStart()
throws Exception
onStart 在类中 org.apache.flink.runtime.rpc.RpcEndpointExceptionpublic CompletableFuture<Void> onStop()
onStop 在类中 org.apache.flink.runtime.rpc.RpcEndpointpublic CompletableFuture<Acknowledge> submitJob(JobGraph jobGraph, org.apache.flink.api.common.time.Time timeout)
DispatcherGatewaysubmitJob 在接口中 DispatcherGatewayjobGraph - JobGraph to submittimeout - RPC timeoutpublic CompletableFuture<Collection<org.apache.flink.api.common.JobID>> listJobs(org.apache.flink.api.common.time.Time timeout)
DispatcherGatewaylistJobs 在接口中 DispatcherGatewaytimeout - RPC timeoutpublic CompletableFuture<Acknowledge> disposeSavepoint(String savepointPath, org.apache.flink.api.common.time.Time timeout)
RestfulGatewaydisposeSavepoint 在接口中 RestfulGatewaysavepointPath - identifying the savepoint to disposetimeout - RPC timeoutpublic CompletableFuture<Acknowledge> cancelJob(org.apache.flink.api.common.JobID jobId, org.apache.flink.api.common.time.Time timeout)
RestfulGatewaycancelJob 在接口中 RestfulGatewayjobId - identifying the job to canceltimeout - of the operationpublic CompletableFuture<ClusterOverview> requestClusterOverview(org.apache.flink.api.common.time.Time timeout)
RestfulGatewayrequestClusterOverview 在接口中 RestfulGatewaytimeout - for the asynchronous operationpublic CompletableFuture<MultipleJobsDetails> requestMultipleJobDetails(org.apache.flink.api.common.time.Time timeout)
RestfulGatewayrequestMultipleJobDetails 在接口中 RestfulGatewaytimeout - for the asynchronous operationpublic CompletableFuture<org.apache.flink.api.common.JobStatus> requestJobStatus(org.apache.flink.api.common.JobID jobId, org.apache.flink.api.common.time.Time timeout)
RestfulGatewayJobStatus of the given job.requestJobStatus 在接口中 RestfulGatewayjobId - identifying the job for which to retrieve the JobStatustimeout - for the asynchronous operationJobStatus of the given jobpublic CompletableFuture<ExecutionGraphInfo> requestExecutionGraphInfo(org.apache.flink.api.common.JobID jobId, org.apache.flink.api.common.time.Time timeout)
RestfulGatewayExecutionGraphInfo containing additional information besides the ArchivedExecutionGraph. If there is no such graph, then the future is completed with a
FlinkJobNotFoundException.requestExecutionGraphInfo 在接口中 RestfulGatewayjobId - identifying the job whose ExecutionGraphInfo is requestedtimeout - for the asynchronous operationExecutionGraphInfo for the given jobId, otherwise
FlinkJobNotFoundExceptionpublic CompletableFuture<JobResult> requestJobResult(org.apache.flink.api.common.JobID jobId, org.apache.flink.api.common.time.Time timeout)
RestfulGatewayJobResult of a job specified by the given jobId.requestJobResult 在接口中 RestfulGatewayjobId - identifying the job for which to retrieve the JobResult.timeout - for the asynchronous operationJobResult once the job has finishedpublic CompletableFuture<Collection<String>> requestMetricQueryServiceAddresses(org.apache.flink.api.common.time.Time timeout)
RestfulGatewayMetricQueryService to query.requestMetricQueryServiceAddresses 在接口中 RestfulGatewaytimeout - for the asynchronous operationpublic CompletableFuture<Collection<org.apache.flink.api.java.tuple.Tuple2<ResourceID,String>>> requestTaskManagerMetricQueryServiceAddresses(org.apache.flink.api.common.time.Time timeout)
RestfulGatewayMetricQueryService to query.requestTaskManagerMetricQueryServiceAddresses 在接口中 RestfulGatewaytimeout - for the asynchronous operationpublic CompletableFuture<Integer> getBlobServerPort(org.apache.flink.api.common.time.Time timeout)
DispatcherGatewaygetBlobServerPort 在接口中 DispatcherGatewaytimeout - of the operationpublic CompletableFuture<String> triggerSavepoint(org.apache.flink.api.common.JobID jobId, String targetDirectory, boolean cancelJob, org.apache.flink.api.common.time.Time timeout)
RestfulGatewaytriggerSavepoint 在接口中 RestfulGatewayjobId - ID of the job for which the savepoint should be triggered.targetDirectory - Target directory for the savepoint.timeout - Timeout for the asynchronous operationexternal pointer of
the savepoint.public CompletableFuture<String> stopWithSavepoint(org.apache.flink.api.common.JobID jobId, String targetDirectory, boolean terminate, org.apache.flink.api.common.time.Time timeout)
RestfulGatewaystopWithSavepoint 在接口中 RestfulGatewayjobId - ID of the job for which the savepoint should be triggered.targetDirectory - to which to write the savepoint data or null if the default savepoint
directory should be usedterminate - flag indicating if the job should terminate or just suspendtimeout - for the rpc callpublic CompletableFuture<Acknowledge> shutDownCluster()
shutDownCluster 在接口中 RestfulGatewaypublic CompletableFuture<Acknowledge> shutDownCluster(ApplicationStatus applicationStatus)
shutDownCluster 在接口中 DispatcherGatewaypublic CompletableFuture<CoordinationResponse> deliverCoordinationRequestToCoordinator(org.apache.flink.api.common.JobID jobId, OperatorID operatorId, org.apache.flink.util.SerializedValue<CoordinationRequest> serializedRequest, org.apache.flink.api.common.time.Time timeout)
RestfulGatewaydeliverCoordinationRequestToCoordinator 在接口中 RestfulGatewayjobId - identifying the job which the coordinator belongs tooperatorId - identifying the coordinator to receive the requestserializedRequest - serialized request to delivertimeout - RPC timeoutFlinkException if the task is not running, or no
operator/coordinator exists for the given ID, or the coordinator cannot handle client
events.protected void onFatalError(Throwable throwable)
protected CompletableFuture<org.apache.flink.runtime.dispatcher.Dispatcher.CleanupJobState> jobReachedTerminalState(ExecutionGraphInfo executionGraphInfo)
public CompletableFuture<Void> onRemovedJobGraph(org.apache.flink.api.common.JobID jobId)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.