public interface RestfulGateway extends RpcGateway
Gateways which implement this method run a REST endpoint which is reachable under the returned address.
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Acknowledge> |
cancelJob(org.apache.flink.api.common.JobID jobId,
org.apache.flink.api.common.time.Time timeout)
Cancel the given job.
|
default 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.
|
default CompletableFuture<Acknowledge> |
disposeSavepoint(String savepointPath,
org.apache.flink.api.common.time.Time timeout)
Dispose the given savepoint.
|
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 . |
default CompletableFuture<ArchivedExecutionGraph> |
requestJob(org.apache.flink.api.common.JobID jobId,
org.apache.flink.api.common.time.Time timeout)
Requests the
ArchivedExecutionGraph for the given jobId. |
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. |
default 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. |
default CompletableFuture<Acknowledge> |
shutDownCluster() |
default 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.
|
default 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.
|
getAddress, getHostname
CompletableFuture<Acknowledge> cancelJob(org.apache.flink.api.common.JobID jobId, org.apache.flink.api.common.time.Time timeout)
jobId
- identifying the job to canceltimeout
- of the operationdefault CompletableFuture<ArchivedExecutionGraph> requestJob(org.apache.flink.api.common.JobID jobId, org.apache.flink.api.common.time.Time timeout)
ArchivedExecutionGraph
for the given jobId. If there is no such graph,
then the future is completed with a FlinkJobNotFoundException
.jobId
- identifying the job whose ArchivedExecutionGraph
is requestedtimeout
- for the asynchronous operationArchivedExecutionGraph
for the given jobId, otherwise
FlinkJobNotFoundException
CompletableFuture<ExecutionGraphInfo> requestExecutionGraphInfo(org.apache.flink.api.common.JobID jobId, org.apache.flink.api.common.time.Time timeout)
ExecutionGraphInfo
containing additional information besides the ArchivedExecutionGraph
. If there is no such graph, then the future is completed with a
FlinkJobNotFoundException
.jobId
- identifying the job whose ExecutionGraphInfo
is requestedtimeout
- for the asynchronous operationExecutionGraphInfo
for the given jobId, otherwise
FlinkJobNotFoundException
CompletableFuture<JobResult> requestJobResult(org.apache.flink.api.common.JobID jobId, org.apache.flink.api.common.time.Time timeout)
JobResult
of a job specified by the given jobId.CompletableFuture<MultipleJobsDetails> requestMultipleJobDetails(org.apache.flink.api.common.time.Time timeout)
timeout
- for the asynchronous operationCompletableFuture<ClusterOverview> requestClusterOverview(org.apache.flink.api.common.time.Time timeout)
timeout
- for the asynchronous operationCompletableFuture<Collection<String>> requestMetricQueryServiceAddresses(org.apache.flink.api.common.time.Time timeout)
MetricQueryService
to query.timeout
- for the asynchronous operationCompletableFuture<Collection<org.apache.flink.api.java.tuple.Tuple2<ResourceID,String>>> requestTaskManagerMetricQueryServiceAddresses(org.apache.flink.api.common.time.Time timeout)
MetricQueryService
to query.timeout
- for the asynchronous operationdefault CompletableFuture<String> triggerSavepoint(org.apache.flink.api.common.JobID jobId, String targetDirectory, boolean cancelJob, org.apache.flink.api.common.time.Time timeout)
jobId
- 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.default CompletableFuture<String> stopWithSavepoint(org.apache.flink.api.common.JobID jobId, String targetDirectory, boolean terminate, org.apache.flink.api.common.time.Time timeout)
jobId
- 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 calldefault CompletableFuture<Acknowledge> disposeSavepoint(String savepointPath, org.apache.flink.api.common.time.Time timeout)
savepointPath
- identifying the savepoint to disposetimeout
- RPC timeoutdefault CompletableFuture<org.apache.flink.api.common.JobStatus> requestJobStatus(org.apache.flink.api.common.JobID jobId, org.apache.flink.api.common.time.Time timeout)
JobStatus
of the given job.jobId
- identifying the job for which to retrieve the JobStatustimeout
- for the asynchronous operationJobStatus
of the given jobdefault CompletableFuture<Acknowledge> shutDownCluster()
default 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)
jobId
- 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.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.