Interface DispatcherGateway
- All Superinterfaces:
org.apache.flink.runtime.rpc.FencedRpcGateway<DispatcherId>,RestfulGateway,org.apache.flink.runtime.rpc.RpcGateway
- All Known Implementing Classes:
Dispatcher,StandaloneDispatcher
public interface DispatcherGateway
extends org.apache.flink.runtime.rpc.FencedRpcGateway<DispatcherId>, RestfulGateway
Gateway for the Dispatcher component.
-
Method Summary
Modifier and TypeMethodDescriptiongetBlobServerPort(Duration timeout) Returns the port of the blob server.CompletableFuture<Collection<org.apache.flink.api.common.JobID>>List the current set of submitted jobs.default CompletableFuture<Acknowledge>shutDownCluster(ApplicationStatus applicationStatus) default CompletableFuture<String>stopWithSavepointAndGetLocation(org.apache.flink.api.common.JobID jobId, String targetDirectory, org.apache.flink.core.execution.SavepointFormatType formatType, TriggerSavepointMode savepointMode, Duration timeout) Stops the job with a savepoint, returning a future that completes with the savepoint location when the savepoint is completed.submitFailedJob(org.apache.flink.api.common.JobID jobId, String jobName, Throwable exception) submitJob(ExecutionPlan executionPlan, Duration timeout) Submit a job to the dispatcher.default CompletableFuture<String>triggerCheckpoint(org.apache.flink.api.common.JobID jobID, Duration timeout) default CompletableFuture<Long>triggerCheckpointAndGetCheckpointID(org.apache.flink.api.common.JobID jobId, org.apache.flink.core.execution.CheckpointType checkpointType, Duration timeout) Triggers a checkpoint, returning a future that completes with the checkpoint id when it is complete.default CompletableFuture<String>triggerSavepointAndGetLocation(org.apache.flink.api.common.JobID jobId, String targetDirectory, org.apache.flink.core.execution.SavepointFormatType formatType, TriggerSavepointMode savepointMode, Duration timeout) Triggers a savepoint with the given savepoint directory as a target, returning a future that completes with the savepoint location when it is complete.Methods inherited from interface org.apache.flink.runtime.rpc.FencedRpcGateway
getFencingTokenMethods inherited from interface org.apache.flink.runtime.webmonitor.RestfulGateway
cancelJob, deliverCoordinationRequestToCoordinator, disposeSavepoint, getTriggeredCheckpointStatus, getTriggeredSavepointStatus, reportJobClientHeartbeat, requestCheckpointStats, requestClusterOverview, requestExecutionGraphInfo, requestJob, requestJobResourceRequirements, requestJobResult, requestJobStatus, requestMetricQueryServiceAddresses, requestMultipleJobDetails, requestTaskManagerMetricQueryServiceAddresses, requestThreadDump, shutDownCluster, stopWithSavepoint, triggerCheckpoint, triggerSavepoint, updateJobResourceRequirementsMethods inherited from interface org.apache.flink.runtime.rpc.RpcGateway
getAddress, getHostname
-
Method Details
-
submitJob
Submit a job to the dispatcher.- Parameters:
executionPlan- ExecutionPlan to submittimeout- RPC timeout- Returns:
- A future acknowledge if the submission succeeded
-
submitFailedJob
CompletableFuture<Acknowledge> submitFailedJob(org.apache.flink.api.common.JobID jobId, String jobName, Throwable exception) -
listJobs
List the current set of submitted jobs.- Parameters:
timeout- RPC timeout- Returns:
- A future collection of currently submitted jobs
-
getBlobServerPort
Returns the port of the blob server.- Parameters:
timeout- of the operation- Returns:
- A future integer of the blob server port
-
shutDownCluster
-
triggerCheckpoint
default CompletableFuture<String> triggerCheckpoint(org.apache.flink.api.common.JobID jobID, Duration timeout) -
triggerSavepointAndGetLocation
default CompletableFuture<String> triggerSavepointAndGetLocation(org.apache.flink.api.common.JobID jobId, String targetDirectory, org.apache.flink.core.execution.SavepointFormatType formatType, TriggerSavepointMode savepointMode, Duration timeout) Triggers a savepoint with the given savepoint directory as a target, returning a future that completes with the savepoint location when it is complete.- Parameters:
jobId- the job idtargetDirectory- Target directory for the savepoint.formatType- Binary format of the savepoint.savepointMode- context of the savepoint operationtimeout- Timeout for the asynchronous operation- Returns:
- Future which is completed once the operation is triggered successfully
-
stopWithSavepointAndGetLocation
default CompletableFuture<String> stopWithSavepointAndGetLocation(org.apache.flink.api.common.JobID jobId, String targetDirectory, org.apache.flink.core.execution.SavepointFormatType formatType, TriggerSavepointMode savepointMode, Duration timeout) Stops the job with a savepoint, returning a future that completes with the savepoint location when the savepoint is completed.- Parameters:
jobId- the job idtargetDirectory- Target directory for the savepoint.savepointMode- context of the savepoint operationtimeout- for the rpc call- Returns:
- Future which is completed with the savepoint location once it is completed
-
triggerCheckpointAndGetCheckpointID
default CompletableFuture<Long> triggerCheckpointAndGetCheckpointID(org.apache.flink.api.common.JobID jobId, org.apache.flink.core.execution.CheckpointType checkpointType, Duration timeout) Triggers a checkpoint, returning a future that completes with the checkpoint id when it is complete.- Parameters:
jobId- the job idcheckpointType- checkpoint type of this checkpoint (configured / full / incremental)timeout- Timeout for the asynchronous operation- Returns:
- Future which is completed once the operation is triggered successfully
-