Class NonLeaderRetrievalRestfulGateway
- java.lang.Object
-
- org.apache.flink.runtime.webmonitor.NonLeaderRetrievalRestfulGateway
-
- All Implemented Interfaces:
org.apache.flink.runtime.rpc.RpcGateway
,RestfulGateway
public class NonLeaderRetrievalRestfulGateway extends Object implements RestfulGateway
* Gateway for restful endpoints without leader retrieval logic. * *Gateways which implement this method run a REST endpoint which is reachable under the returned address, and can be used in
AbstractHandler
without leader retrieval logic.
-
-
Field Summary
Fields Modifier and Type Field Description static NonLeaderRetrievalRestfulGateway
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Acknowledge>
cancelJob(org.apache.flink.api.common.JobID jobId, Duration timeout)
Cancel the given job.String
getAddress()
String
getHostname()
CompletableFuture<CheckpointStatsSnapshot>
requestCheckpointStats(org.apache.flink.api.common.JobID jobId, Duration timeout)
Requests theCheckpointStatsSnapshot
containing checkpointing information.CompletableFuture<ClusterOverview>
requestClusterOverview(Duration timeout)
Requests the cluster status overview.CompletableFuture<ExecutionGraphInfo>
requestExecutionGraphInfo(org.apache.flink.api.common.JobID jobId, Duration timeout)
Requests theExecutionGraphInfo
containing additional information besides theArchivedExecutionGraph
.CompletableFuture<JobResult>
requestJobResult(org.apache.flink.api.common.JobID jobId, Duration timeout)
Requests theJobResult
of a job specified by the given jobId.CompletableFuture<Collection<String>>
requestMetricQueryServiceAddresses(Duration timeout)
Requests the addresses of theMetricQueryService
to query.CompletableFuture<MultipleJobsDetails>
requestMultipleJobDetails(Duration timeout)
Requests job details currently being executed on the Flink cluster.CompletableFuture<Collection<org.apache.flink.api.java.tuple.Tuple2<ResourceID,String>>>
requestTaskManagerMetricQueryServiceAddresses(Duration timeout)
Requests the addresses for the TaskManagers'MetricQueryService
to query.CompletableFuture<ThreadDumpInfo>
requestThreadDump(Duration timeout)
Requests the thread dump from the JobManager.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.runtime.webmonitor.RestfulGateway
deliverCoordinationRequestToCoordinator, disposeSavepoint, getTriggeredCheckpointStatus, getTriggeredSavepointStatus, reportJobClientHeartbeat, requestJob, requestJobResourceRequirements, requestJobStatus, shutDownCluster, stopWithSavepoint, triggerCheckpoint, triggerSavepoint, updateJobResourceRequirements
-
-
-
-
Field Detail
-
INSTANCE
public static final NonLeaderRetrievalRestfulGateway INSTANCE
-
-
Method Detail
-
getAddress
public String getAddress()
- Specified by:
getAddress
in interfaceorg.apache.flink.runtime.rpc.RpcGateway
-
getHostname
public String getHostname()
- Specified by:
getHostname
in interfaceorg.apache.flink.runtime.rpc.RpcGateway
-
cancelJob
public CompletableFuture<Acknowledge> cancelJob(org.apache.flink.api.common.JobID jobId, Duration timeout)
Description copied from interface:RestfulGateway
Cancel the given job.- Specified by:
cancelJob
in interfaceRestfulGateway
- Parameters:
jobId
- identifying the job to canceltimeout
- of the operation- Returns:
- A future acknowledge if the cancellation succeeded
-
requestExecutionGraphInfo
public CompletableFuture<ExecutionGraphInfo> requestExecutionGraphInfo(org.apache.flink.api.common.JobID jobId, Duration timeout)
Description copied from interface:RestfulGateway
Requests theExecutionGraphInfo
containing additional information besides theArchivedExecutionGraph
. If there is no such graph, then the future is completed with aFlinkJobNotFoundException
.- Specified by:
requestExecutionGraphInfo
in interfaceRestfulGateway
- Parameters:
jobId
- identifying the job whoseExecutionGraphInfo
is requestedtimeout
- for the asynchronous operation- Returns:
- Future containing the
ExecutionGraphInfo
for the given jobId, otherwiseFlinkJobNotFoundException
-
requestCheckpointStats
public CompletableFuture<CheckpointStatsSnapshot> requestCheckpointStats(org.apache.flink.api.common.JobID jobId, Duration timeout)
Description copied from interface:RestfulGateway
Requests theCheckpointStatsSnapshot
containing checkpointing information.- Specified by:
requestCheckpointStats
in interfaceRestfulGateway
- Parameters:
jobId
- identifying the job whoseCheckpointStatsSnapshot
is requestedtimeout
- for the asynchronous operation- Returns:
- Future containing the
CheckpointStatsSnapshot
for the given jobId
-
requestJobResult
public CompletableFuture<JobResult> requestJobResult(org.apache.flink.api.common.JobID jobId, Duration timeout)
Description copied from interface:RestfulGateway
Requests theJobResult
of a job specified by the given jobId.- Specified by:
requestJobResult
in interfaceRestfulGateway
- Parameters:
jobId
- identifying the job for which to retrieve theJobResult
.timeout
- for the asynchronous operation- Returns:
- Future which is completed with the job's
JobResult
once the job has finished
-
requestMultipleJobDetails
public CompletableFuture<MultipleJobsDetails> requestMultipleJobDetails(Duration timeout)
Description copied from interface:RestfulGateway
Requests job details currently being executed on the Flink cluster.- Specified by:
requestMultipleJobDetails
in interfaceRestfulGateway
- Parameters:
timeout
- for the asynchronous operation- Returns:
- Future containing the job details
-
requestClusterOverview
public CompletableFuture<ClusterOverview> requestClusterOverview(Duration timeout)
Description copied from interface:RestfulGateway
Requests the cluster status overview.- Specified by:
requestClusterOverview
in interfaceRestfulGateway
- Parameters:
timeout
- for the asynchronous operation- Returns:
- Future containing the status overview
-
requestMetricQueryServiceAddresses
public CompletableFuture<Collection<String>> requestMetricQueryServiceAddresses(Duration timeout)
Description copied from interface:RestfulGateway
Requests the addresses of theMetricQueryService
to query.- Specified by:
requestMetricQueryServiceAddresses
in interfaceRestfulGateway
- Parameters:
timeout
- for the asynchronous operation- Returns:
- Future containing the collection of metric query service addresses to query
-
requestTaskManagerMetricQueryServiceAddresses
public CompletableFuture<Collection<org.apache.flink.api.java.tuple.Tuple2<ResourceID,String>>> requestTaskManagerMetricQueryServiceAddresses(Duration timeout)
Description copied from interface:RestfulGateway
Requests the addresses for the TaskManagers'MetricQueryService
to query.- Specified by:
requestTaskManagerMetricQueryServiceAddresses
in interfaceRestfulGateway
- Parameters:
timeout
- for the asynchronous operation- Returns:
- Future containing the collection of instance ids and the corresponding metric query service address
-
requestThreadDump
public CompletableFuture<ThreadDumpInfo> requestThreadDump(Duration timeout)
Description copied from interface:RestfulGateway
Requests the thread dump from the JobManager.- Specified by:
requestThreadDump
in interfaceRestfulGateway
- Parameters:
timeout
- timeout of the asynchronous operation- Returns:
- Future containing the thread dump information
-
-