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(JobID jobId,
Time timeout)
Cancel the given job.
|
default CompletableFuture<CoordinationResponse> |
deliverCoordinationRequestToCoordinator(JobID jobId,
OperatorID operatorId,
SerializedValue<CoordinationRequest> serializedRequest,
Time timeout)
Deliver a coordination request to a specified coordinator and return the response.
|
default CompletableFuture<Acknowledge> |
disposeSavepoint(String savepointPath,
Time timeout)
Dispose the given savepoint.
|
default CompletableFuture<OperationResult<Long>> |
getTriggeredCheckpointStatus(AsynchronousJobOperationKey operationKey)
Get the status of a checkpoint triggered under the specified operation key.
|
default CompletableFuture<OperationResult<String>> |
getTriggeredSavepointStatus(AsynchronousJobOperationKey operationKey)
Get the status of a savepoint triggered under the specified operation key.
|
default CompletableFuture<Void> |
reportJobClientHeartbeat(JobID jobId,
long expiredTimestamp,
Time timeout)
The client reports the heartbeat to the dispatcher for aliveness.
|
CompletableFuture<CheckpointStatsSnapshot> |
requestCheckpointStats(JobID jobId,
Time timeout)
Requests the
CheckpointStatsSnapshot containing checkpointing information. |
CompletableFuture<ClusterOverview> |
requestClusterOverview(Time timeout)
Requests the cluster status overview.
|
CompletableFuture<ExecutionGraphInfo> |
requestExecutionGraphInfo(JobID jobId,
Time timeout)
Requests the
ExecutionGraphInfo containing additional information besides the ArchivedExecutionGraph . |
default CompletableFuture<ArchivedExecutionGraph> |
requestJob(JobID jobId,
Time timeout)
Requests the
ArchivedExecutionGraph for the given jobId. |
default CompletableFuture<JobResourceRequirements> |
requestJobResourceRequirements(JobID jobId)
Read current
job resource requirements for a given job. |
CompletableFuture<JobResult> |
requestJobResult(JobID jobId,
Time timeout)
Requests the
JobResult of a job specified by the given jobId. |
default CompletableFuture<JobStatus> |
requestJobStatus(JobID jobId,
Time timeout)
Request the
JobStatus of the given job. |
CompletableFuture<Collection<String>> |
requestMetricQueryServiceAddresses(Time timeout)
Requests the addresses of the
MetricQueryService to query. |
CompletableFuture<MultipleJobsDetails> |
requestMultipleJobDetails(Time timeout)
Requests job details currently being executed on the Flink cluster.
|
CompletableFuture<Collection<Tuple2<ResourceID,String>>> |
requestTaskManagerMetricQueryServiceAddresses(Time timeout)
Requests the addresses for the TaskManagers'
MetricQueryService to query. |
CompletableFuture<ThreadDumpInfo> |
requestThreadDump(Time timeout)
Requests the thread dump from the JobManager.
|
default CompletableFuture<Acknowledge> |
shutDownCluster() |
default CompletableFuture<Acknowledge> |
stopWithSavepoint(AsynchronousJobOperationKey operationKey,
String targetDirectory,
SavepointFormatType formatType,
TriggerSavepointMode savepointMode,
Time timeout)
Stops the job with a savepoint, returning a future that completes when the operation is
started.
|
default CompletableFuture<Acknowledge> |
triggerCheckpoint(AsynchronousJobOperationKey operationKey,
CheckpointType checkpointType,
Time timeout)
Triggers a checkpoint with the given savepoint directory as a target.
|
default CompletableFuture<Acknowledge> |
triggerSavepoint(AsynchronousJobOperationKey operationKey,
String targetDirectory,
SavepointFormatType formatType,
TriggerSavepointMode savepointMode,
Time timeout)
Triggers a savepoint with the given savepoint directory as a target, returning a future that
completes when the operation is started.
|
default CompletableFuture<Acknowledge> |
updateJobResourceRequirements(JobID jobId,
JobResourceRequirements jobResourceRequirements)
Update
job resource requirements for a given job. |
getAddress, getHostname
CompletableFuture<Acknowledge> cancelJob(JobID jobId, Time timeout)
jobId
- identifying the job to canceltimeout
- of the operationdefault CompletableFuture<ArchivedExecutionGraph> requestJob(JobID jobId, 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(JobID jobId, 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<CheckpointStatsSnapshot> requestCheckpointStats(JobID jobId, Time timeout)
CheckpointStatsSnapshot
containing checkpointing information.jobId
- identifying the job whose CheckpointStatsSnapshot
is requestedtimeout
- for the asynchronous operationCheckpointStatsSnapshot
for the given jobIdCompletableFuture<JobResult> requestJobResult(JobID jobId, Time timeout)
JobResult
of a job specified by the given jobId.CompletableFuture<MultipleJobsDetails> requestMultipleJobDetails(Time timeout)
timeout
- for the asynchronous operationCompletableFuture<ClusterOverview> requestClusterOverview(Time timeout)
timeout
- for the asynchronous operationCompletableFuture<Collection<String>> requestMetricQueryServiceAddresses(Time timeout)
MetricQueryService
to query.timeout
- for the asynchronous operationCompletableFuture<Collection<Tuple2<ResourceID,String>>> requestTaskManagerMetricQueryServiceAddresses(Time timeout)
MetricQueryService
to query.timeout
- for the asynchronous operationCompletableFuture<ThreadDumpInfo> requestThreadDump(Time timeout)
timeout
- timeout of the asynchronous operationdefault CompletableFuture<Acknowledge> triggerCheckpoint(AsynchronousJobOperationKey operationKey, CheckpointType checkpointType, Time timeout)
operationKey
- the key of the operation, for deduplication purposescheckpointType
- checkpoint backup type (configured / full / incremental)timeout
- Timeout for the asynchronous operationexternal pointer
of
the savepoint.default CompletableFuture<OperationResult<Long>> getTriggeredCheckpointStatus(AsynchronousJobOperationKey operationKey)
operationKey
- key of the operationdefault CompletableFuture<Acknowledge> triggerSavepoint(AsynchronousJobOperationKey operationKey, String targetDirectory, SavepointFormatType formatType, TriggerSavepointMode savepointMode, Time timeout)
operationKey
- the key of the operation, for deduplication purposestargetDirectory
- Target directory for the savepoint.formatType
- Binary format of the savepoint.savepointMode
- context of the savepoint operationtimeout
- Timeout for the asynchronous operationdefault CompletableFuture<Acknowledge> stopWithSavepoint(AsynchronousJobOperationKey operationKey, String targetDirectory, SavepointFormatType formatType, TriggerSavepointMode savepointMode, Time timeout)
operationKey
- key of the operation, for deduplicationtargetDirectory
- Target directory for the savepoint.formatType
- Binary format of the savepoint.savepointMode
- context of the savepoint operationtimeout
- for the rpc calldefault CompletableFuture<OperationResult<String>> getTriggeredSavepointStatus(AsynchronousJobOperationKey operationKey)
operationKey
- key of the operationdefault CompletableFuture<Acknowledge> disposeSavepoint(String savepointPath, Time timeout)
savepointPath
- identifying the savepoint to disposetimeout
- RPC timeoutdefault CompletableFuture<JobStatus> requestJobStatus(JobID jobId, 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(JobID jobId, OperatorID operatorId, SerializedValue<CoordinationRequest> serializedRequest, 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.default CompletableFuture<Void> reportJobClientHeartbeat(JobID jobId, long expiredTimestamp, Time timeout)
default CompletableFuture<JobResourceRequirements> requestJobResourceRequirements(JobID jobId)
job resource requirements
for a given job.jobId
- job to read the resource requirements fordefault CompletableFuture<Acknowledge> updateJobResourceRequirements(JobID jobId, JobResourceRequirements jobResourceRequirements)
job resource requirements
for a given job. When the
returned future is complete the requirements have been updated and were persisted in HA, but
the job may not have been rescaled (yet).jobId
- job the given requirements belong tojobResourceRequirements
- new resource requirements for the jobCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.