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
AbstractHandlerwithout leader retrieval logic.
-
-
Field Summary
Fields Modifier and Type Field Description static NonLeaderRetrievalRestfulGatewayINSTANCE
-
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.StringgetAddress()StringgetHostname()CompletableFuture<CheckpointStatsSnapshot>requestCheckpointStats(org.apache.flink.api.common.JobID jobId, Duration timeout)Requests theCheckpointStatsSnapshotcontaining 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 theExecutionGraphInfocontaining additional information besides theArchivedExecutionGraph.CompletableFuture<JobResult>requestJobResult(org.apache.flink.api.common.JobID jobId, Duration timeout)Requests theJobResultof a job specified by the given jobId.CompletableFuture<Collection<String>>requestMetricQueryServiceAddresses(Duration timeout)Requests the addresses of theMetricQueryServiceto 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'MetricQueryServiceto 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:
getAddressin interfaceorg.apache.flink.runtime.rpc.RpcGateway
-
getHostname
public String getHostname()
- Specified by:
getHostnamein interfaceorg.apache.flink.runtime.rpc.RpcGateway
-
cancelJob
public CompletableFuture<Acknowledge> cancelJob(org.apache.flink.api.common.JobID jobId, Duration timeout)
Description copied from interface:RestfulGatewayCancel the given job.- Specified by:
cancelJobin 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:RestfulGatewayRequests theExecutionGraphInfocontaining additional information besides theArchivedExecutionGraph. If there is no such graph, then the future is completed with aFlinkJobNotFoundException.- Specified by:
requestExecutionGraphInfoin interfaceRestfulGateway- Parameters:
jobId- identifying the job whoseExecutionGraphInfois requestedtimeout- for the asynchronous operation- Returns:
- Future containing the
ExecutionGraphInfofor the given jobId, otherwiseFlinkJobNotFoundException
-
requestCheckpointStats
public CompletableFuture<CheckpointStatsSnapshot> requestCheckpointStats(org.apache.flink.api.common.JobID jobId, Duration timeout)
Description copied from interface:RestfulGatewayRequests theCheckpointStatsSnapshotcontaining checkpointing information.- Specified by:
requestCheckpointStatsin interfaceRestfulGateway- Parameters:
jobId- identifying the job whoseCheckpointStatsSnapshotis requestedtimeout- for the asynchronous operation- Returns:
- Future containing the
CheckpointStatsSnapshotfor the given jobId
-
requestJobResult
public CompletableFuture<JobResult> requestJobResult(org.apache.flink.api.common.JobID jobId, Duration timeout)
Description copied from interface:RestfulGatewayRequests theJobResultof a job specified by the given jobId.- Specified by:
requestJobResultin 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
JobResultonce the job has finished
-
requestMultipleJobDetails
public CompletableFuture<MultipleJobsDetails> requestMultipleJobDetails(Duration timeout)
Description copied from interface:RestfulGatewayRequests job details currently being executed on the Flink cluster.- Specified by:
requestMultipleJobDetailsin interfaceRestfulGateway- Parameters:
timeout- for the asynchronous operation- Returns:
- Future containing the job details
-
requestClusterOverview
public CompletableFuture<ClusterOverview> requestClusterOverview(Duration timeout)
Description copied from interface:RestfulGatewayRequests the cluster status overview.- Specified by:
requestClusterOverviewin 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:RestfulGatewayRequests the addresses of theMetricQueryServiceto query.- Specified by:
requestMetricQueryServiceAddressesin 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:RestfulGatewayRequests the addresses for the TaskManagers'MetricQueryServiceto query.- Specified by:
requestTaskManagerMetricQueryServiceAddressesin 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:RestfulGatewayRequests the thread dump from the JobManager.- Specified by:
requestThreadDumpin interfaceRestfulGateway- Parameters:
timeout- timeout of the asynchronous operation- Returns:
- Future containing the thread dump information
-
-