Interface RestfulGateway

    • Method Detail

      • cancelJob

        CompletableFuture<Acknowledge> cancelJob​(org.apache.flink.api.common.JobID jobId,
                                                 org.apache.flink.api.common.time.Time timeout)
        Cancel the given job.
        Parameters:
        jobId - identifying the job to cancel
        timeout - of the operation
        Returns:
        A future acknowledge if the cancellation succeeded
      • requestJobResult

        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.
        Parameters:
        jobId - identifying the job for which to retrieve the JobResult.
        timeout - for the asynchronous operation
        Returns:
        Future which is completed with the job's JobResult once the job has finished
      • requestMultipleJobDetails

        CompletableFuture<MultipleJobsDetails> requestMultipleJobDetails​(org.apache.flink.api.common.time.Time timeout)
        Requests job details currently being executed on the Flink cluster.
        Parameters:
        timeout - for the asynchronous operation
        Returns:
        Future containing the job details
      • requestClusterOverview

        CompletableFuture<ClusterOverview> requestClusterOverview​(org.apache.flink.api.common.time.Time timeout)
        Requests the cluster status overview.
        Parameters:
        timeout - for the asynchronous operation
        Returns:
        Future containing the status overview
      • requestMetricQueryServiceAddresses

        CompletableFuture<Collection<String>> requestMetricQueryServiceAddresses​(org.apache.flink.api.common.time.Time timeout)
        Requests the addresses of the MetricQueryService to query.
        Parameters:
        timeout - for the asynchronous operation
        Returns:
        Future containing the collection of metric query service addresses to query
      • requestTaskManagerMetricQueryServiceAddresses

        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.
        Parameters:
        timeout - for the asynchronous operation
        Returns:
        Future containing the collection of instance ids and the corresponding metric query service address
      • requestThreadDump

        CompletableFuture<ThreadDumpInfo> requestThreadDump​(org.apache.flink.api.common.time.Time timeout)
        Requests the thread dump from the JobManager.
        Parameters:
        timeout - timeout of the asynchronous operation
        Returns:
        Future containing the thread dump information
      • triggerCheckpoint

        default CompletableFuture<Acknowledge> triggerCheckpoint​(AsynchronousJobOperationKey operationKey,
                                                                 org.apache.flink.core.execution.CheckpointType checkpointType,
                                                                 org.apache.flink.api.common.time.Time timeout)
        Triggers a checkpoint with the given savepoint directory as a target.
        Parameters:
        operationKey - the key of the operation, for deduplication purposes
        checkpointType - checkpoint backup type (configured / full / incremental)
        timeout - Timeout for the asynchronous operation
        Returns:
        A future to the external pointer of the savepoint.
      • getTriggeredCheckpointStatus

        default CompletableFuture<OperationResult<Long>> getTriggeredCheckpointStatus​(AsynchronousJobOperationKey operationKey)
        Get the status of a checkpoint triggered under the specified operation key.
        Parameters:
        operationKey - key of the operation
        Returns:
        Future which completes immediately with the status, or fails if no operation is registered for the key
      • triggerSavepoint

        default CompletableFuture<Acknowledge> triggerSavepoint​(AsynchronousJobOperationKey operationKey,
                                                                String targetDirectory,
                                                                org.apache.flink.core.execution.SavepointFormatType formatType,
                                                                TriggerSavepointMode savepointMode,
                                                                org.apache.flink.api.common.time.Time timeout)
        Triggers a savepoint with the given savepoint directory as a target, returning a future that completes when the operation is started.
        Parameters:
        operationKey - the key of the operation, for deduplication purposes
        targetDirectory - Target directory for the savepoint.
        formatType - Binary format of the savepoint.
        savepointMode - context of the savepoint operation
        timeout - Timeout for the asynchronous operation
        Returns:
        Future which is completed once the operation is triggered successfully
      • stopWithSavepoint

        default CompletableFuture<Acknowledge> stopWithSavepoint​(AsynchronousJobOperationKey operationKey,
                                                                 String targetDirectory,
                                                                 org.apache.flink.core.execution.SavepointFormatType formatType,
                                                                 TriggerSavepointMode savepointMode,
                                                                 org.apache.flink.api.common.time.Time timeout)
        Stops the job with a savepoint, returning a future that completes when the operation is started.
        Parameters:
        operationKey - key of the operation, for deduplication
        targetDirectory - Target directory for the savepoint.
        formatType - Binary format of the savepoint.
        savepointMode - context of the savepoint operation
        timeout - for the rpc call
        Returns:
        Future which is completed once the operation is triggered successfully
      • getTriggeredSavepointStatus

        default CompletableFuture<OperationResult<String>> getTriggeredSavepointStatus​(AsynchronousJobOperationKey operationKey)
        Get the status of a savepoint triggered under the specified operation key.
        Parameters:
        operationKey - key of the operation
        Returns:
        Future which completes immediately with the status, or fails if no operation is registered for the key
      • disposeSavepoint

        default CompletableFuture<Acknowledge> disposeSavepoint​(String savepointPath,
                                                                org.apache.flink.api.common.time.Time timeout)
        Dispose the given savepoint.
        Parameters:
        savepointPath - identifying the savepoint to dispose
        timeout - RPC timeout
        Returns:
        A future acknowledge if the disposal succeeded
      • requestJobStatus

        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.
        Parameters:
        jobId - identifying the job for which to retrieve the JobStatus
        timeout - for the asynchronous operation
        Returns:
        A future to the JobStatus of the given job
      • deliverCoordinationRequestToCoordinator

        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.
        Parameters:
        jobId - identifying the job which the coordinator belongs to
        operatorId - identifying the coordinator to receive the request
        serializedRequest - serialized request to deliver
        timeout - RPC timeout
        Returns:
        A future containing the response. The response will fail with a FlinkException if the task is not running, or no operator/coordinator exists for the given ID, or the coordinator cannot handle client events.
      • reportJobClientHeartbeat

        default CompletableFuture<Void> reportJobClientHeartbeat​(org.apache.flink.api.common.JobID jobId,
                                                                 long expiredTimestamp,
                                                                 org.apache.flink.api.common.time.Time timeout)
        The client reports the heartbeat to the dispatcher for aliveness.
      • requestJobResourceRequirements

        default CompletableFuture<JobResourceRequirements> requestJobResourceRequirements​(org.apache.flink.api.common.JobID jobId)
        Read current job resource requirements for a given job.
        Parameters:
        jobId - job to read the resource requirements for
        Returns:
        Future which that contains current resource requirements.
      • updateJobResourceRequirements

        default CompletableFuture<Acknowledge> updateJobResourceRequirements​(org.apache.flink.api.common.JobID jobId,
                                                                             JobResourceRequirements jobResourceRequirements)
        Update 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).
        Parameters:
        jobId - job the given requirements belong to
        jobResourceRequirements - new resource requirements for the job
        Returns:
        Future which is completed successfully when requirements are updated