Class JobMaster
- java.lang.Object
-
- org.apache.flink.runtime.rpc.RpcEndpoint
-
- org.apache.flink.runtime.rpc.FencedRpcEndpoint<JobMasterId>
-
- org.apache.flink.runtime.jobmaster.JobMaster
-
- All Implemented Interfaces:
AutoCloseable,BlocklistListener,CheckpointCoordinatorGateway,JobMasterGateway,JobMasterOperatorEventGateway,JobMasterService,KvStateLocationOracle,KvStateRegistryGateway,org.apache.flink.runtime.rpc.FencedRpcGateway<JobMasterId>,org.apache.flink.runtime.rpc.RpcGateway,org.apache.flink.util.AutoCloseableAsync
public class JobMaster extends org.apache.flink.runtime.rpc.FencedRpcEndpoint<JobMasterId> implements JobMasterGateway, JobMasterService
JobMaster implementation. The job master is responsible for the execution of a singleExecutionPlan.It offers the following methods as part of its rpc interface to interact with the JobMaster remotely:
updateTaskExecutionState(org.apache.flink.runtime.taskmanager.TaskExecutionState)updates the task execution state for given task
-
-
Field Summary
Fields Modifier and Type Field Description static StringJOB_MANAGER_NAMEDefault names for Flink's distributed components.
-
Constructor Summary
Constructors Constructor Description JobMaster(org.apache.flink.runtime.rpc.RpcService rpcService, JobMasterId jobMasterId, JobMasterConfiguration jobMasterConfiguration, ResourceID resourceId, ExecutionPlan executionPlan, HighAvailabilityServices highAvailabilityService, SlotPoolServiceSchedulerFactory slotPoolServiceSchedulerFactory, JobManagerSharedServices jobManagerSharedServices, HeartbeatServices heartbeatServices, JobManagerJobMetricGroupFactory jobMetricGroupFactory, OnCompletionActions jobCompletionActions, org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler, ClassLoader userCodeLoader, ShuffleMaster<?> shuffleMaster, PartitionTrackerFactory partitionTrackerFactory, ExecutionDeploymentTracker executionDeploymentTracker, ExecutionDeploymentReconciler.Factory executionDeploymentReconcilerFactory, BlocklistHandler.Factory blocklistHandlerFactory, Collection<org.apache.flink.core.failure.FailureEnricher> failureEnrichers, long initializationTimestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacknowledgeCheckpoint(org.apache.flink.api.common.JobID jobID, ExecutionAttemptID executionAttemptID, long checkpointId, CheckpointMetrics checkpointMetrics, org.apache.flink.util.SerializedValue<TaskStateSnapshot> checkpointState)CompletableFuture<Acknowledge>cancel(Duration timeout)Cancels the currently executed job.voiddeclineCheckpoint(DeclineCheckpoint decline)CompletableFuture<CoordinationResponse>deliverCoordinationRequestToCoordinator(OperatorID operatorId, org.apache.flink.util.SerializedValue<CoordinationRequest> serializedRequest, Duration timeout)Deliver a coordination request to a specified coordinator and return the response.voiddisconnectResourceManager(ResourceManagerId resourceManagerId, Exception cause)Disconnects the resource manager from the job manager because of the given cause.CompletableFuture<Acknowledge>disconnectTaskManager(ResourceID resourceID, Exception cause)Disconnects the givenTaskExecutorfrom theJobMaster.voidfailSlot(ResourceID taskManagerId, AllocationID allocationId, Exception cause)Fails the slot with the given allocation id and cause.JobMasterGatewaygetGateway()Get theJobMasterGatewaybelonging to this service.CompletableFuture<Collection<PartitionWithMetrics>>getPartitionWithMetrics(Duration timeout, Set<ResultPartitionID> expectedPartitions)Get specified partitions and their metrics (identified byexpectedPartitions), the metrics include sizes of sub-partitions in a result partition.CompletableFuture<Void>heartbeatFromResourceManager(ResourceID resourceID)Sends heartbeat request from the resource manager.CompletableFuture<Void>heartbeatFromTaskManager(ResourceID resourceID, TaskExecutorToJobManagerHeartbeatPayload payload)Sends the heartbeat to job manager from task manager.voidnotifyEndOfData(ExecutionAttemptID executionAttempt)Notifies that the task has reached the end of data.CompletableFuture<Acknowledge>notifyKvStateRegistered(org.apache.flink.api.common.JobID jobId, JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName, org.apache.flink.queryablestate.KvStateID kvStateId, InetSocketAddress kvStateServerAddress)Notifies that queryable state has been registered.CompletableFuture<Acknowledge>notifyKvStateUnregistered(org.apache.flink.api.common.JobID jobId, JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName)Notifies that queryable state has been unregistered.CompletableFuture<Acknowledge>notifyNewBlockedNodes(Collection<BlockedNode> newNodes)Notify new blocked node records.voidnotifyNotEnoughResourcesAvailable(Collection<ResourceRequirement> acquiredResources)Notifies that not enough resources are available to fulfill the resource requirements of a job.CompletableFuture<Collection<SlotOffer>>offerSlots(ResourceID taskManagerId, Collection<SlotOffer> slots, Duration timeout)Offers the given slots to the job manager.protected voidonStart()CompletableFuture<Void>onStop()Suspend the job and shutdown all other services including rpc.CompletableFuture<RegistrationResponse>registerTaskManager(org.apache.flink.api.common.JobID jobId, TaskManagerRegistrationInformation taskManagerRegistrationInformation, Duration timeout)Registers the task manager at the job manager.voidreportCheckpointMetrics(org.apache.flink.api.common.JobID jobID, ExecutionAttemptID executionAttemptID, long checkpointId, CheckpointMetrics checkpointMetrics)voidreportInitializationMetrics(org.apache.flink.api.common.JobID jobId, ExecutionAttemptID executionAttemptId, SubTaskInitializationMetrics initializationMetrics)CompletableFuture<CheckpointStatsSnapshot>requestCheckpointStats(Duration timeout)Requests theCheckpointStatsSnapshotof the job.CompletableFuture<ExecutionGraphInfo>requestJob(Duration timeout)Requests theExecutionGraphInfoof the executed job.CompletableFuture<JobResourceRequirements>requestJobResourceRequirements()Read currentjob resource requirements.CompletableFuture<org.apache.flink.api.common.JobStatus>requestJobStatus(Duration timeout)Requests the current job status.CompletableFuture<KvStateLocation>requestKvStateLocation(org.apache.flink.api.common.JobID jobId, String registrationName)Requests aKvStateLocationfor the specifiedInternalKvStateregistration name.CompletableFuture<SerializedInputSplit>requestNextInputSplit(JobVertexID vertexID, ExecutionAttemptID executionAttempt)Requests the next input split for theExecutionJobVertex.CompletableFuture<ExecutionState>requestPartitionState(IntermediateDataSetID intermediateResultId, ResultPartitionID resultPartitionId)Requests the current state of the partition.CompletableFuture<Acknowledge>sendOperatorEventToCoordinator(ExecutionAttemptID task, OperatorID operatorID, org.apache.flink.util.SerializedValue<OperatorEvent> serializedEvent)CompletableFuture<CoordinationResponse>sendRequestToCoordinator(OperatorID operatorID, org.apache.flink.util.SerializedValue<CoordinationRequest> serializedRequest)voidstartFetchAndRetainPartitionWithMetricsOnTaskManager()Notify jobMaster to fetch and retain partitions on task managers.CompletableFuture<?>stopTrackingAndReleasePartitions(Collection<ResultPartitionID> partitionIds)Notifies theJobMasterPartitionTrackerto stop tracking the target result partitions and release the locally occupied resources onTaskExecutors if any.CompletableFuture<String>stopWithSavepoint(String targetDirectory, org.apache.flink.core.execution.SavepointFormatType formatType, boolean terminate, Duration timeout)Stops the job with a savepoint.CompletableFuture<CompletedCheckpoint>triggerCheckpoint(org.apache.flink.core.execution.CheckpointType checkpointType, Duration timeout)Triggers taking a checkpoint of the executed job.CompletableFuture<String>triggerSavepoint(String targetDirectory, boolean cancelJob, org.apache.flink.core.execution.SavepointFormatType formatType, Duration timeout)Triggers taking a savepoint of the executed job.CompletableFuture<Object>updateGlobalAggregate(String aggregateName, Object aggregand, byte[] serializedAggregateFunction)Update the aggregate and return the new value.CompletableFuture<Acknowledge>updateJobResourceRequirements(JobResourceRequirements jobResourceRequirements)Updatejob resource requirements.CompletableFuture<Acknowledge>updateTaskExecutionState(TaskExecutionState taskExecutionState)Updates the task execution state for a given task.-
Methods inherited from class org.apache.flink.runtime.rpc.RpcEndpoint
callAsync, closeAsync, getAddress, getEndpointId, getHostname, getMainThreadExecutor, getMainThreadExecutor, getRpcService, getSelfGateway, getTerminationFuture, internalCallOnStart, internalCallOnStop, isRunning, registerResource, runAsync, scheduleRunAsync, scheduleRunAsync, start, stop, unregisterResource, validateRunsInMainThread
-
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.jobmaster.JobMasterGateway
triggerCheckpoint
-
Methods inherited from interface org.apache.flink.runtime.jobmaster.JobMasterService
getAddress, getTerminationFuture
-
-
-
-
Field Detail
-
JOB_MANAGER_NAME
public static final String JOB_MANAGER_NAME
Default names for Flink's distributed components.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JobMaster
public JobMaster(org.apache.flink.runtime.rpc.RpcService rpcService, JobMasterId jobMasterId, JobMasterConfiguration jobMasterConfiguration, ResourceID resourceId, ExecutionPlan executionPlan, HighAvailabilityServices highAvailabilityService, SlotPoolServiceSchedulerFactory slotPoolServiceSchedulerFactory, JobManagerSharedServices jobManagerSharedServices, HeartbeatServices heartbeatServices, JobManagerJobMetricGroupFactory jobMetricGroupFactory, OnCompletionActions jobCompletionActions, org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler, ClassLoader userCodeLoader, ShuffleMaster<?> shuffleMaster, PartitionTrackerFactory partitionTrackerFactory, ExecutionDeploymentTracker executionDeploymentTracker, ExecutionDeploymentReconciler.Factory executionDeploymentReconcilerFactory, BlocklistHandler.Factory blocklistHandlerFactory, Collection<org.apache.flink.core.failure.FailureEnricher> failureEnrichers, long initializationTimestamp) throws Exception- Throws:
Exception
-
-
Method Detail
-
onStart
protected void onStart() throws JobMasterException- Overrides:
onStartin classorg.apache.flink.runtime.rpc.RpcEndpoint- Throws:
JobMasterException
-
onStop
public CompletableFuture<Void> onStop()
Suspend the job and shutdown all other services including rpc.- Overrides:
onStopin classorg.apache.flink.runtime.rpc.RpcEndpoint
-
cancel
public CompletableFuture<Acknowledge> cancel(Duration timeout)
Description copied from interface:JobMasterGatewayCancels the currently executed job.- Specified by:
cancelin interfaceJobMasterGateway- Parameters:
timeout- of this operation- Returns:
- Future acknowledge of the operation
-
updateTaskExecutionState
public CompletableFuture<Acknowledge> updateTaskExecutionState(TaskExecutionState taskExecutionState)
Updates the task execution state for a given task.- Specified by:
updateTaskExecutionStatein interfaceJobMasterGateway- Parameters:
taskExecutionState- New task execution state for a given task- Returns:
- Acknowledge the task execution state update
-
notifyEndOfData
public void notifyEndOfData(ExecutionAttemptID executionAttempt)
Description copied from interface:JobMasterGatewayNotifies that the task has reached the end of data.- Specified by:
notifyEndOfDatain interfaceJobMasterGateway- Parameters:
executionAttempt- The execution attempt id.
-
requestNextInputSplit
public CompletableFuture<SerializedInputSplit> requestNextInputSplit(JobVertexID vertexID, ExecutionAttemptID executionAttempt)
Description copied from interface:JobMasterGatewayRequests the next input split for theExecutionJobVertex. The next input split is sent back to the sender as aSerializedInputSplitmessage.- Specified by:
requestNextInputSplitin interfaceJobMasterGateway- Parameters:
vertexID- The job vertex idexecutionAttempt- The execution attempt id- Returns:
- The future of the input split. If there is no further input split, will return an empty object.
-
requestPartitionState
public CompletableFuture<ExecutionState> requestPartitionState(IntermediateDataSetID intermediateResultId, ResultPartitionID resultPartitionId)
Description copied from interface:JobMasterGatewayRequests the current state of the partition. The state of a partition is currently bound to the state of the producing execution.- Specified by:
requestPartitionStatein interfaceJobMasterGateway- Parameters:
intermediateResultId- The execution attempt ID of the task requesting the partition state.resultPartitionId- The partition ID of the partition to request the state of.- Returns:
- The future of the partition state
-
disconnectTaskManager
public CompletableFuture<Acknowledge> disconnectTaskManager(ResourceID resourceID, Exception cause)
Description copied from interface:JobMasterGatewayDisconnects the givenTaskExecutorfrom theJobMaster.- Specified by:
disconnectTaskManagerin interfaceJobMasterGateway- Parameters:
resourceID- identifying the TaskManager to disconnectcause- for the disconnection of the TaskManager- Returns:
- Future acknowledge once the JobMaster has been disconnected from the TaskManager
-
acknowledgeCheckpoint
public void acknowledgeCheckpoint(org.apache.flink.api.common.JobID jobID, ExecutionAttemptID executionAttemptID, long checkpointId, CheckpointMetrics checkpointMetrics, @Nullable org.apache.flink.util.SerializedValue<TaskStateSnapshot> checkpointState)- Specified by:
acknowledgeCheckpointin interfaceCheckpointCoordinatorGateway
-
reportCheckpointMetrics
public void reportCheckpointMetrics(org.apache.flink.api.common.JobID jobID, ExecutionAttemptID executionAttemptID, long checkpointId, CheckpointMetrics checkpointMetrics)- Specified by:
reportCheckpointMetricsin interfaceCheckpointCoordinatorGateway
-
reportInitializationMetrics
public void reportInitializationMetrics(org.apache.flink.api.common.JobID jobId, ExecutionAttemptID executionAttemptId, SubTaskInitializationMetrics initializationMetrics)- Specified by:
reportInitializationMetricsin interfaceCheckpointCoordinatorGateway
-
declineCheckpoint
public void declineCheckpoint(DeclineCheckpoint decline)
- Specified by:
declineCheckpointin interfaceCheckpointCoordinatorGateway
-
sendOperatorEventToCoordinator
public CompletableFuture<Acknowledge> sendOperatorEventToCoordinator(ExecutionAttemptID task, OperatorID operatorID, org.apache.flink.util.SerializedValue<OperatorEvent> serializedEvent)
- Specified by:
sendOperatorEventToCoordinatorin interfaceJobMasterOperatorEventGateway
-
sendRequestToCoordinator
public CompletableFuture<CoordinationResponse> sendRequestToCoordinator(OperatorID operatorID, org.apache.flink.util.SerializedValue<CoordinationRequest> serializedRequest)
- Specified by:
sendRequestToCoordinatorin interfaceJobMasterOperatorEventGateway
-
requestKvStateLocation
public CompletableFuture<KvStateLocation> requestKvStateLocation(org.apache.flink.api.common.JobID jobId, String registrationName)
Description copied from interface:KvStateLocationOracleRequests aKvStateLocationfor the specifiedInternalKvStateregistration name.- Specified by:
requestKvStateLocationin interfaceKvStateLocationOracle- Parameters:
jobId- identifying the job for which to request theKvStateLocationregistrationName- Name under which the KvState has been registered.- Returns:
- Future of the requested
InternalKvStatelocation
-
notifyKvStateRegistered
public CompletableFuture<Acknowledge> notifyKvStateRegistered(org.apache.flink.api.common.JobID jobId, JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName, org.apache.flink.queryablestate.KvStateID kvStateId, InetSocketAddress kvStateServerAddress)
Description copied from interface:KvStateRegistryGatewayNotifies that queryable state has been registered.- Specified by:
notifyKvStateRegisteredin interfaceKvStateRegistryGateway- Parameters:
jobId- identifying the job for which to register a key value statejobVertexId- JobVertexID the KvState instance belongs to.keyGroupRange- Key group range the KvState instance belongs to.registrationName- Name under which the KvState has been registered.kvStateId- ID of the registered KvState instance.kvStateServerAddress- Server address where to find the KvState instance.- Returns:
- Future acknowledge if the key-value state has been registered
-
notifyKvStateUnregistered
public CompletableFuture<Acknowledge> notifyKvStateUnregistered(org.apache.flink.api.common.JobID jobId, JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName)
Description copied from interface:KvStateRegistryGatewayNotifies that queryable state has been unregistered.- Specified by:
notifyKvStateUnregisteredin interfaceKvStateRegistryGateway- Parameters:
jobId- identifying the job for which to unregister a key value statejobVertexId- JobVertexID the KvState instance belongs to.keyGroupRange- Key group index the KvState instance belongs to.registrationName- Name under which the KvState has been registered.- Returns:
- Future acknowledge if the key-value state has been unregistered
-
offerSlots
public CompletableFuture<Collection<SlotOffer>> offerSlots(ResourceID taskManagerId, Collection<SlotOffer> slots, Duration timeout)
Description copied from interface:JobMasterGatewayOffers the given slots to the job manager. The response contains the set of accepted slots.- Specified by:
offerSlotsin interfaceJobMasterGateway- Parameters:
taskManagerId- identifying the task managerslots- to offer to the job managertimeout- for the rpc call- Returns:
- Future set of accepted slots.
-
failSlot
public void failSlot(ResourceID taskManagerId, AllocationID allocationId, Exception cause)
Description copied from interface:JobMasterGatewayFails the slot with the given allocation id and cause.- Specified by:
failSlotin interfaceJobMasterGateway- Parameters:
taskManagerId- identifying the task managerallocationId- identifying the slot to failcause- of the failing
-
registerTaskManager
public CompletableFuture<RegistrationResponse> registerTaskManager(org.apache.flink.api.common.JobID jobId, TaskManagerRegistrationInformation taskManagerRegistrationInformation, Duration timeout)
Description copied from interface:JobMasterGatewayRegisters the task manager at the job manager.- Specified by:
registerTaskManagerin interfaceJobMasterGateway- Parameters:
jobId- jobId specifying the job for which the JobMaster should be responsibletaskManagerRegistrationInformation- the information for registering a task manager at the job managertimeout- for the rpc call- Returns:
- Future registration response indicating whether the registration was successful or not
-
disconnectResourceManager
public void disconnectResourceManager(ResourceManagerId resourceManagerId, Exception cause)
Description copied from interface:JobMasterGatewayDisconnects the resource manager from the job manager because of the given cause.- Specified by:
disconnectResourceManagerin interfaceJobMasterGateway- Parameters:
resourceManagerId- identifying the resource manager leader idcause- of the disconnect
-
heartbeatFromTaskManager
public CompletableFuture<Void> heartbeatFromTaskManager(ResourceID resourceID, TaskExecutorToJobManagerHeartbeatPayload payload)
Description copied from interface:JobMasterGatewaySends the heartbeat to job manager from task manager.- Specified by:
heartbeatFromTaskManagerin interfaceJobMasterGateway- Parameters:
resourceID- unique id of the task managerpayload- report payload- Returns:
- future which is completed exceptionally if the operation fails
-
heartbeatFromResourceManager
public CompletableFuture<Void> heartbeatFromResourceManager(ResourceID resourceID)
Description copied from interface:JobMasterGatewaySends heartbeat request from the resource manager.- Specified by:
heartbeatFromResourceManagerin interfaceJobMasterGateway- Parameters:
resourceID- unique id of the resource manager- Returns:
- future which is completed exceptionally if the operation fails
-
requestJobStatus
public CompletableFuture<org.apache.flink.api.common.JobStatus> requestJobStatus(Duration timeout)
Description copied from interface:JobMasterGatewayRequests the current job status.- Specified by:
requestJobStatusin interfaceJobMasterGateway- Parameters:
timeout- for the rpc call- Returns:
- Future containing the current job status
-
requestJob
public CompletableFuture<ExecutionGraphInfo> requestJob(Duration timeout)
Description copied from interface:JobMasterGatewayRequests theExecutionGraphInfoof the executed job.- Specified by:
requestJobin interfaceJobMasterGateway- Parameters:
timeout- for the rpc call- Returns:
- Future which is completed with the
ExecutionGraphInfoof the executed job
-
requestCheckpointStats
public CompletableFuture<CheckpointStatsSnapshot> requestCheckpointStats(Duration timeout)
Description copied from interface:JobMasterGatewayRequests theCheckpointStatsSnapshotof the job.- Specified by:
requestCheckpointStatsin interfaceJobMasterGateway- Parameters:
timeout- for the rpc call- Returns:
- Future which is completed with the
CheckpointStatsSnapshotof the job
-
triggerCheckpoint
public CompletableFuture<CompletedCheckpoint> triggerCheckpoint(org.apache.flink.core.execution.CheckpointType checkpointType, Duration timeout)
Description copied from interface:JobMasterGatewayTriggers taking a checkpoint of the executed job.- Specified by:
triggerCheckpointin interfaceJobMasterGateway- Parameters:
checkpointType- to determine how checkpoint should be takentimeout- for the rpc call- Returns:
- Future which is completed with the CompletedCheckpoint once completed
-
triggerSavepoint
public CompletableFuture<String> triggerSavepoint(@Nullable String targetDirectory, boolean cancelJob, org.apache.flink.core.execution.SavepointFormatType formatType, Duration timeout)
Description copied from interface:JobMasterGatewayTriggers taking a savepoint of the executed job.- Specified by:
triggerSavepointin interfaceJobMasterGateway- Parameters:
targetDirectory- to which to write the savepoint data or null if the default savepoint directory should be usedformatType- binary format for the savepointtimeout- for the rpc call- Returns:
- Future which is completed with the savepoint path once completed
-
stopWithSavepoint
public CompletableFuture<String> stopWithSavepoint(@Nullable String targetDirectory, org.apache.flink.core.execution.SavepointFormatType formatType, boolean terminate, Duration timeout)
Description copied from interface:JobMasterGatewayStops the job with a savepoint.- Specified by:
stopWithSavepointin interfaceJobMasterGateway- Parameters:
targetDirectory- to which to write the savepoint data or null if the default savepoint directory should be usedterminate- flag indicating if the job should terminate or just suspendtimeout- for the rpc call- Returns:
- Future which is completed with the savepoint path once completed
-
notifyNotEnoughResourcesAvailable
public void notifyNotEnoughResourcesAvailable(Collection<ResourceRequirement> acquiredResources)
Description copied from interface:JobMasterGatewayNotifies that not enough resources are available to fulfill the resource requirements of a job.- Specified by:
notifyNotEnoughResourcesAvailablein interfaceJobMasterGateway- Parameters:
acquiredResources- the resources that have been acquired for the job
-
updateGlobalAggregate
public CompletableFuture<Object> updateGlobalAggregate(String aggregateName, Object aggregand, byte[] serializedAggregateFunction)
Description copied from interface:JobMasterGatewayUpdate the aggregate and return the new value.- Specified by:
updateGlobalAggregatein interfaceJobMasterGateway- Parameters:
aggregateName- The name of the aggregate to updateaggregand- The value to add to the aggregateserializedAggregateFunction- The function to apply to the current aggregate and aggregand to obtain the new aggregate value, this should be of typeAggregateFunction- Returns:
- The updated aggregate
-
deliverCoordinationRequestToCoordinator
public CompletableFuture<CoordinationResponse> deliverCoordinationRequestToCoordinator(OperatorID operatorId, org.apache.flink.util.SerializedValue<CoordinationRequest> serializedRequest, Duration timeout)
Description copied from interface:JobMasterGatewayDeliver a coordination request to a specified coordinator and return the response.- Specified by:
deliverCoordinationRequestToCoordinatorin interfaceJobMasterGateway- Parameters:
operatorId- identifying the coordinator to receive the requestserializedRequest- serialized request to deliver- Returns:
- A future containing the response. The response will fail with a
FlinkExceptionif the task is not running, or no operator/coordinator exists for the given ID, or the coordinator cannot handle client events.
-
stopTrackingAndReleasePartitions
public CompletableFuture<?> stopTrackingAndReleasePartitions(Collection<ResultPartitionID> partitionIds)
Description copied from interface:JobMasterGatewayNotifies theJobMasterPartitionTrackerto stop tracking the target result partitions and release the locally occupied resources onTaskExecutors if any.- Specified by:
stopTrackingAndReleasePartitionsin interfaceJobMasterGateway
-
getPartitionWithMetrics
public CompletableFuture<Collection<PartitionWithMetrics>> getPartitionWithMetrics(Duration timeout, Set<ResultPartitionID> expectedPartitions)
Description copied from interface:JobMasterGatewayGet specified partitions and their metrics (identified byexpectedPartitions), the metrics include sizes of sub-partitions in a result partition.- Specified by:
getPartitionWithMetricsin interfaceJobMasterGateway- Parameters:
timeout- The timeout used for retrieve the specified partitions.expectedPartitions- The set of identifiers for the result partitions whose metrics are to be fetched.- Returns:
- A future will contain a collection of the partitions with their metrics that could be retrieved from the expected partitions within the specified timeout period.
-
startFetchAndRetainPartitionWithMetricsOnTaskManager
public void startFetchAndRetainPartitionWithMetricsOnTaskManager()
Description copied from interface:JobMasterGatewayNotify jobMaster to fetch and retain partitions on task managers. It will process for future TaskManager registrations and already registered TaskManagers.- Specified by:
startFetchAndRetainPartitionWithMetricsOnTaskManagerin interfaceJobMasterGateway
-
notifyNewBlockedNodes
public CompletableFuture<Acknowledge> notifyNewBlockedNodes(Collection<BlockedNode> newNodes)
Description copied from interface:BlocklistListenerNotify new blocked node records.- Specified by:
notifyNewBlockedNodesin interfaceBlocklistListener- Parameters:
newNodes- the new blocked node records- Returns:
- Future acknowledge once the new nodes have successfully notified.
-
requestJobResourceRequirements
public CompletableFuture<JobResourceRequirements> requestJobResourceRequirements()
Description copied from interface:JobMasterGatewayRead currentjob resource requirements.- Specified by:
requestJobResourceRequirementsin interfaceJobMasterGateway- Returns:
- Future which that contains current resource requirements.
-
updateJobResourceRequirements
public CompletableFuture<Acknowledge> updateJobResourceRequirements(JobResourceRequirements jobResourceRequirements)
Description copied from interface:JobMasterGatewayUpdatejob resource requirements.- Specified by:
updateJobResourceRequirementsin interfaceJobMasterGateway- Parameters:
jobResourceRequirements- new resource requirements- Returns:
- Future which is completed successfully when requirements are updated
-
getGateway
public JobMasterGateway getGateway()
Description copied from interface:JobMasterServiceGet theJobMasterGatewaybelonging to this service.- Specified by:
getGatewayin interfaceJobMasterService- Returns:
- JobMasterGateway belonging to this service
-
-