Class EmbeddedJobClient

  • All Implemented Interfaces:
    org.apache.flink.core.execution.JobClient, org.apache.flink.runtime.operators.coordination.CoordinationRequestGateway

    @Internal
    public class EmbeddedJobClient
    extends Object
    implements org.apache.flink.core.execution.JobClient, org.apache.flink.runtime.operators.coordination.CoordinationRequestGateway
    A JobClient with the ability to also submit jobs which uses directly the DispatcherGateway.
    • Constructor Detail

      • EmbeddedJobClient

        public EmbeddedJobClient​(org.apache.flink.api.common.JobID jobId,
                                 org.apache.flink.runtime.dispatcher.DispatcherGateway dispatcherGateway,
                                 org.apache.flink.util.concurrent.ScheduledExecutor retryExecutor,
                                 Duration rpcTimeout,
                                 ClassLoader classLoader)
    • Method Detail

      • getJobID

        public org.apache.flink.api.common.JobID getJobID()
        Specified by:
        getJobID in interface org.apache.flink.core.execution.JobClient
      • getJobStatus

        public CompletableFuture<org.apache.flink.api.common.JobStatus> getJobStatus()
        Specified by:
        getJobStatus in interface org.apache.flink.core.execution.JobClient
      • cancel

        public CompletableFuture<Void> cancel()
        Specified by:
        cancel in interface org.apache.flink.core.execution.JobClient
      • stopWithSavepoint

        public CompletableFuture<String> stopWithSavepoint​(boolean advanceToEndOfEventTime,
                                                           @Nullable
                                                           String savepointDirectory,
                                                           org.apache.flink.core.execution.SavepointFormatType formatType)
        Specified by:
        stopWithSavepoint in interface org.apache.flink.core.execution.JobClient
      • triggerSavepoint

        public CompletableFuture<String> triggerSavepoint​(@Nullable
                                                          String savepointDirectory,
                                                          org.apache.flink.core.execution.SavepointFormatType formatType)
        Specified by:
        triggerSavepoint in interface org.apache.flink.core.execution.JobClient
      • getAccumulators

        public CompletableFuture<Map<String,​Object>> getAccumulators()
        Specified by:
        getAccumulators in interface org.apache.flink.core.execution.JobClient
      • getJobExecutionResult

        public CompletableFuture<org.apache.flink.api.common.JobExecutionResult> getJobExecutionResult()
        Specified by:
        getJobExecutionResult in interface org.apache.flink.core.execution.JobClient
      • sendCoordinationRequest

        public CompletableFuture<org.apache.flink.runtime.operators.coordination.CoordinationResponse> sendCoordinationRequest​(String operatorUid,
                                                                                                                               org.apache.flink.runtime.operators.coordination.CoordinationRequest request)
        Specified by:
        sendCoordinationRequest in interface org.apache.flink.runtime.operators.coordination.CoordinationRequestGateway