public interface JobMasterGateway extends CheckpointCoordinatorGateway, FencedRpcGateway<JobMasterId>, KvStateLocationOracle, KvStateRegistryGateway, JobMasterOperatorEventGateway, BlocklistListener
JobMaster
rpc gateway interface.Modifier and Type | Method and Description |
---|---|
CompletableFuture<Acknowledge> |
cancel(Time timeout)
Cancels the currently executed job.
|
CompletableFuture<CoordinationResponse> |
deliverCoordinationRequestToCoordinator(OperatorID operatorId,
SerializedValue<CoordinationRequest> serializedRequest,
Time timeout)
Deliver a coordination request to a specified coordinator and return the response.
|
void |
disconnectResourceManager(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 given
TaskExecutor from the
JobMaster . |
void |
failSlot(ResourceID taskManagerId,
AllocationID allocationId,
Exception cause)
Fails the slot with the given allocation id and cause.
|
default CompletableFuture<Collection<PartitionWithMetrics>> |
getPartitionWithMetrics(Duration timeout,
Set<ResultPartitionID> expectedPartitions)
Get specified partitions and their metrics (identified by
expectedPartitions ), 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.
|
void |
notifyEndOfData(ExecutionAttemptID executionAttempt)
Notifies that the task has reached the end of data.
|
void |
notifyNotEnoughResourcesAvailable(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,
Time timeout)
Offers the given slots to the job manager.
|
CompletableFuture<RegistrationResponse> |
registerTaskManager(JobID jobId,
TaskManagerRegistrationInformation taskManagerRegistrationInformation,
Time timeout)
Registers the task manager at the job manager.
|
CompletableFuture<CheckpointStatsSnapshot> |
requestCheckpointStats(Time timeout)
Requests the
CheckpointStatsSnapshot of the job. |
CompletableFuture<ExecutionGraphInfo> |
requestJob(Time timeout)
Requests the
ExecutionGraphInfo of the executed job. |
CompletableFuture<JobResourceRequirements> |
requestJobResourceRequirements()
Read current
job resource requirements . |
CompletableFuture<JobStatus> |
requestJobStatus(Time timeout)
Requests the current job status.
|
CompletableFuture<SerializedInputSplit> |
requestNextInputSplit(JobVertexID vertexID,
ExecutionAttemptID executionAttempt)
Requests the next input split for the
ExecutionJobVertex . |
CompletableFuture<ExecutionState> |
requestPartitionState(IntermediateDataSetID intermediateResultId,
ResultPartitionID partitionId)
Requests the current state of the partition.
|
default void |
startFetchAndRetainPartitionWithMetricsOnTaskManager()
Notify jobMaster to fetch and retain partitions on task managers.
|
CompletableFuture<?> |
stopTrackingAndReleasePartitions(Collection<ResultPartitionID> partitionIds)
Notifies the
JobMasterPartitionTracker
to stop tracking the target result partitions and release the locally occupied resources on
TaskExecutor s if any. |
CompletableFuture<String> |
stopWithSavepoint(String targetDirectory,
SavepointFormatType formatType,
boolean terminate,
Time timeout)
Stops the job with a savepoint.
|
CompletableFuture<CompletedCheckpoint> |
triggerCheckpoint(CheckpointType checkpointType,
Time timeout)
Triggers taking a checkpoint of the executed job.
|
default CompletableFuture<String> |
triggerCheckpoint(Time timeout)
Triggers taking a checkpoint of the executed job.
|
CompletableFuture<String> |
triggerSavepoint(String targetDirectory,
boolean cancelJob,
SavepointFormatType formatType,
Time timeout)
Triggers taking a savepoint of the executed job.
|
CompletableFuture<Object> |
updateGlobalAggregate(String aggregateName,
Object aggregand,
byte[] serializedAggregationFunction)
Update the aggregate and return the new value.
|
CompletableFuture<Acknowledge> |
updateJobResourceRequirements(JobResourceRequirements jobResourceRequirements)
Update
job resource requirements . |
CompletableFuture<Acknowledge> |
updateTaskExecutionState(TaskExecutionState taskExecutionState)
Updates the task execution state for a given task.
|
acknowledgeCheckpoint, declineCheckpoint, reportCheckpointMetrics, reportInitializationMetrics
getFencingToken
getAddress, getHostname
requestKvStateLocation
notifyKvStateRegistered, notifyKvStateUnregistered
sendOperatorEventToCoordinator, sendRequestToCoordinator
notifyNewBlockedNodes
CompletableFuture<Acknowledge> cancel(Time timeout)
timeout
- of this operationCompletableFuture<Acknowledge> updateTaskExecutionState(TaskExecutionState taskExecutionState)
taskExecutionState
- New task execution state for a given taskCompletableFuture<SerializedInputSplit> requestNextInputSplit(JobVertexID vertexID, ExecutionAttemptID executionAttempt)
ExecutionJobVertex
. The next input split is
sent back to the sender as a SerializedInputSplit
message.vertexID
- The job vertex idexecutionAttempt
- The execution attempt idCompletableFuture<ExecutionState> requestPartitionState(IntermediateDataSetID intermediateResultId, ResultPartitionID partitionId)
intermediateResultId
- The execution attempt ID of the task requesting the partition
state.partitionId
- The partition ID of the partition to request the state of.CompletableFuture<Acknowledge> disconnectTaskManager(ResourceID resourceID, Exception cause)
TaskExecutor
from the
JobMaster
.resourceID
- identifying the TaskManager to disconnectcause
- for the disconnection of the TaskManagervoid disconnectResourceManager(ResourceManagerId resourceManagerId, Exception cause)
resourceManagerId
- identifying the resource manager leader idcause
- of the disconnectCompletableFuture<Collection<SlotOffer>> offerSlots(ResourceID taskManagerId, Collection<SlotOffer> slots, Time timeout)
taskManagerId
- identifying the task managerslots
- to offer to the job managertimeout
- for the rpc callvoid failSlot(ResourceID taskManagerId, AllocationID allocationId, Exception cause)
taskManagerId
- identifying the task managerallocationId
- identifying the slot to failcause
- of the failingCompletableFuture<RegistrationResponse> registerTaskManager(JobID jobId, TaskManagerRegistrationInformation taskManagerRegistrationInformation, Time timeout)
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 callCompletableFuture<Void> heartbeatFromTaskManager(ResourceID resourceID, TaskExecutorToJobManagerHeartbeatPayload payload)
resourceID
- unique id of the task managerpayload
- report payloadCompletableFuture<Void> heartbeatFromResourceManager(ResourceID resourceID)
resourceID
- unique id of the resource managerCompletableFuture<JobStatus> requestJobStatus(Time timeout)
timeout
- for the rpc callCompletableFuture<ExecutionGraphInfo> requestJob(Time timeout)
ExecutionGraphInfo
of the executed job.timeout
- for the rpc callExecutionGraphInfo
of the executed jobCompletableFuture<CheckpointStatsSnapshot> requestCheckpointStats(Time timeout)
CheckpointStatsSnapshot
of the job.timeout
- for the rpc callCheckpointStatsSnapshot
of the jobCompletableFuture<String> triggerSavepoint(@Nullable String targetDirectory, boolean cancelJob, SavepointFormatType formatType, Time timeout)
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 callCompletableFuture<CompletedCheckpoint> triggerCheckpoint(CheckpointType checkpointType, Time timeout)
checkpointType
- to determine how checkpoint should be takentimeout
- for the rpc calldefault CompletableFuture<String> triggerCheckpoint(Time timeout)
timeout
- for the rpc callCompletableFuture<String> stopWithSavepoint(@Nullable String targetDirectory, SavepointFormatType formatType, boolean terminate, Time timeout)
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 callvoid notifyNotEnoughResourcesAvailable(Collection<ResourceRequirement> acquiredResources)
acquiredResources
- the resources that have been acquired for the jobCompletableFuture<Object> updateGlobalAggregate(String aggregateName, Object aggregand, byte[] serializedAggregationFunction)
aggregateName
- The name of the aggregate to updateaggregand
- The value to add to the aggregateserializedAggregationFunction
- The function to apply to the current aggregate and
aggregand to obtain the new aggregate value, this should be of type AggregateFunction
CompletableFuture<CoordinationResponse> deliverCoordinationRequestToCoordinator(OperatorID operatorId, SerializedValue<CoordinationRequest> serializedRequest, Time timeout)
operatorId
- identifying the coordinator to receive the requestserializedRequest
- serialized request to deliverFlinkException
if the task is not running, or no
operator/coordinator exists for the given ID, or the coordinator cannot handle client
events.CompletableFuture<?> stopTrackingAndReleasePartitions(Collection<ResultPartitionID> partitionIds)
JobMasterPartitionTracker
to stop tracking the target result partitions and release the locally occupied resources on
TaskExecutor
s if any.default CompletableFuture<Collection<PartitionWithMetrics>> getPartitionWithMetrics(Duration timeout, Set<ResultPartitionID> expectedPartitions)
expectedPartitions
), the
metrics include sizes of sub-partitions in a result partition.timeout
- The timeout used for retrieve the specified partitions.expectedPartitions
- The set of identifiers for the result partitions whose metrics are
to be fetched.default void startFetchAndRetainPartitionWithMetricsOnTaskManager()
CompletableFuture<JobResourceRequirements> requestJobResourceRequirements()
job resource requirements
.CompletableFuture<Acknowledge> updateJobResourceRequirements(JobResourceRequirements jobResourceRequirements)
job resource requirements
.jobResourceRequirements
- new resource requirementsvoid notifyEndOfData(ExecutionAttemptID executionAttempt)
executionAttempt
- The execution attempt id.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.