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
A
JobClient for a MiniCluster.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDetermines the behavior of theMiniClusterJobClientwhen the job finishes. -
Constructor Summary
ConstructorsConstructorDescriptionMiniClusterJobClient(org.apache.flink.api.common.JobID jobID, MiniCluster miniCluster, ClassLoader classLoader, MiniClusterJobClient.JobFinalizationBehavior finalizationBehaviour) -
Method Summary
Modifier and TypeMethodDescriptioncancel()CompletableFuture<org.apache.flink.api.common.JobExecutionResult>org.apache.flink.api.common.JobIDgetJobID()CompletableFuture<org.apache.flink.api.common.JobStatus>voidreportHeartbeat(long expiredTimestamp) sendCoordinationRequest(String operatorUid, CoordinationRequest request) Send out a request to a specified coordinator and return the response.stopWithSavepoint(boolean terminate, String savepointDirectory, org.apache.flink.core.execution.SavepointFormatType formatType) triggerSavepoint(String savepointDirectory, org.apache.flink.core.execution.SavepointFormatType formatType)
-
Constructor Details
-
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 Details
-
getJobID
public org.apache.flink.api.common.JobID getJobID()- Specified by:
getJobIDin interfaceorg.apache.flink.core.execution.JobClient
-
getJobStatus
- Specified by:
getJobStatusin interfaceorg.apache.flink.core.execution.JobClient
-
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
- Specified by:
getAccumulatorsin interfaceorg.apache.flink.core.execution.JobClient
-
getJobExecutionResult
- Specified by:
getJobExecutionResultin interfaceorg.apache.flink.core.execution.JobClient
-
sendCoordinationRequest
public CompletableFuture<CoordinationResponse> sendCoordinationRequest(String operatorUid, CoordinationRequest request) Description copied from interface:CoordinationRequestGatewaySend out a request to a specified coordinator and return the response.On the client side, a unique operatorUid must be defined to identify an operator. Otherwise, the query cannot be executed correctly. Note that we use operatorUid instead of operatorID because the latter is an internal runtime concept that cannot be recognized by the client.
- Specified by:
sendCoordinationRequestin interfaceCoordinationRequestGateway- Parameters:
operatorUid- 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
-