Class MiniClusterJobClient
- java.lang.Object
-
- org.apache.flink.runtime.minicluster.MiniClusterJobClient
-
- All Implemented Interfaces:
org.apache.flink.core.execution.JobClient,CoordinationRequestGateway
public final class MiniClusterJobClient extends Object implements org.apache.flink.core.execution.JobClient, CoordinationRequestGateway
AJobClientfor aMiniCluster.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMiniClusterJobClient.JobFinalizationBehaviorDetermines the behavior of theMiniClusterJobClientwhen the job finishes.
-
Constructor Summary
Constructors Constructor Description MiniClusterJobClient(org.apache.flink.api.common.JobID jobID, MiniCluster miniCluster, ClassLoader classLoader, MiniClusterJobClient.JobFinalizationBehavior finalizationBehaviour)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Void>cancel()CompletableFuture<Map<String,Object>>getAccumulators()CompletableFuture<org.apache.flink.api.common.JobExecutionResult>getJobExecutionResult()org.apache.flink.api.common.JobIDgetJobID()CompletableFuture<org.apache.flink.api.common.JobStatus>getJobStatus()voidreportHeartbeat(long expiredTimestamp)CompletableFuture<CoordinationResponse>sendCoordinationRequest(OperatorID operatorId, CoordinationRequest request)Send out a request to a specified coordinator and return the response.CompletableFuture<String>stopWithSavepoint(boolean terminate, String savepointDirectory, org.apache.flink.core.execution.SavepointFormatType formatType)CompletableFuture<String>triggerSavepoint(String savepointDirectory, org.apache.flink.core.execution.SavepointFormatType formatType)
-
-
-
Constructor Detail
-
MiniClusterJobClient
public MiniClusterJobClient(org.apache.flink.api.common.JobID jobID, MiniCluster miniCluster, ClassLoader classLoader, MiniClusterJobClient.JobFinalizationBehavior finalizationBehaviour)Creates aMiniClusterJobClientfor the givenJobIDandMiniCluster. This will shut down theMiniClusterafter job result retrieval ifshutdownClusteristrue.
-
-
Method Detail
-
getJobID
public org.apache.flink.api.common.JobID getJobID()
- Specified by:
getJobIDin interfaceorg.apache.flink.core.execution.JobClient
-
getJobStatus
public CompletableFuture<org.apache.flink.api.common.JobStatus> getJobStatus()
- Specified by:
getJobStatusin interfaceorg.apache.flink.core.execution.JobClient
-
cancel
public CompletableFuture<Void> cancel()
- Specified by:
cancelin interfaceorg.apache.flink.core.execution.JobClient
-
stopWithSavepoint
public CompletableFuture<String> stopWithSavepoint(boolean terminate, @Nullable String savepointDirectory, org.apache.flink.core.execution.SavepointFormatType formatType)
- Specified by:
stopWithSavepointin interfaceorg.apache.flink.core.execution.JobClient
-
triggerSavepoint
public CompletableFuture<String> triggerSavepoint(@Nullable String savepointDirectory, org.apache.flink.core.execution.SavepointFormatType formatType)
- Specified by:
triggerSavepointin interfaceorg.apache.flink.core.execution.JobClient
-
getAccumulators
public CompletableFuture<Map<String,Object>> getAccumulators()
- Specified by:
getAccumulatorsin interfaceorg.apache.flink.core.execution.JobClient
-
getJobExecutionResult
public CompletableFuture<org.apache.flink.api.common.JobExecutionResult> getJobExecutionResult()
- Specified by:
getJobExecutionResultin interfaceorg.apache.flink.core.execution.JobClient
-
sendCoordinationRequest
public CompletableFuture<CoordinationResponse> sendCoordinationRequest(OperatorID operatorId, CoordinationRequest request)
Description copied from interface:CoordinationRequestGatewaySend out a request to a specified coordinator and return the response.- Specified by:
sendCoordinationRequestin interfaceCoordinationRequestGateway- Parameters:
operatorId- specifies which coordinator to receive the requestrequest- the request to send- Returns:
- the response from the coordinator
-
reportHeartbeat
public void reportHeartbeat(long expiredTimestamp)
- Specified by:
reportHeartbeatin interfaceorg.apache.flink.core.execution.JobClient
-
-