public class RpcTaskManagerGateway extends Object implements TaskManagerGateway
TaskManagerGateway
for Flink's RPC system.Constructor and Description |
---|
RpcTaskManagerGateway(TaskExecutorGateway taskExecutorGateway,
JobMasterId jobMasterId) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Acknowledge> |
cancelTask(ExecutionAttemptID executionAttemptID,
Time timeout)
Cancel the given task.
|
CompletableFuture<Acknowledge> |
freeSlot(AllocationID allocationId,
Throwable cause,
Time timeout)
Frees the slot with the given allocation ID.
|
String |
getAddress()
Return the address of the task manager with which the gateway is associated.
|
void |
notifyCheckpointAborted(ExecutionAttemptID executionAttemptID,
JobID jobId,
long checkpointId,
long latestCompletedCheckpointId,
long timestamp)
Notify the given task about a aborted checkpoint.
|
void |
notifyCheckpointOnComplete(ExecutionAttemptID executionAttemptID,
JobID jobId,
long completedCheckpointId,
long completedTimestamp,
long lastSubsumedCheckpointId)
Notify the given task about a completed checkpoint and the last subsumed checkpoint id if
possible.
|
void |
releasePartitions(JobID jobId,
Set<ResultPartitionID> partitionIds)
Batch release intermediate result partitions.
|
CompletableFuture<Acknowledge> |
sendOperatorEventToTask(ExecutionAttemptID task,
OperatorID operator,
SerializedValue<OperatorEvent> evt)
Sends an operator event to an operator in a task executed by the Task Manager (Task
Executor).
|
CompletableFuture<Acknowledge> |
submitTask(TaskDeploymentDescriptor tdd,
Time timeout)
Submit a task to the task manager.
|
CompletableFuture<Acknowledge> |
triggerCheckpoint(ExecutionAttemptID executionAttemptID,
JobID jobId,
long checkpointId,
long timestamp,
CheckpointOptions checkpointOptions)
Trigger for the given task a checkpoint.
|
CompletableFuture<Acknowledge> |
updatePartitions(ExecutionAttemptID executionAttemptID,
Iterable<PartitionInfo> partitionInfos,
Time timeout)
Update the task where the given partitions can be found.
|
public RpcTaskManagerGateway(TaskExecutorGateway taskExecutorGateway, JobMasterId jobMasterId)
public String getAddress()
TaskManagerGateway
getAddress
in interface TaskManagerGateway
public CompletableFuture<Acknowledge> submitTask(TaskDeploymentDescriptor tdd, Time timeout)
TaskManagerGateway
submitTask
in interface TaskManagerGateway
tdd
- describing the task to submittimeout
- of the submit operationpublic CompletableFuture<Acknowledge> cancelTask(ExecutionAttemptID executionAttemptID, Time timeout)
TaskManagerGateway
cancelTask
in interface TaskManagerGateway
executionAttemptID
- identifying the tasktimeout
- of the submit operationpublic CompletableFuture<Acknowledge> updatePartitions(ExecutionAttemptID executionAttemptID, Iterable<PartitionInfo> partitionInfos, Time timeout)
TaskManagerGateway
updatePartitions
in interface TaskManagerGateway
executionAttemptID
- identifying the taskpartitionInfos
- telling where the partition can be retrieved fromtimeout
- of the submit operationpublic void releasePartitions(JobID jobId, Set<ResultPartitionID> partitionIds)
TaskManagerGateway
releasePartitions
in interface TaskManagerGateway
jobId
- id of the job that the partitions belong topartitionIds
- partition ids to releasepublic void notifyCheckpointOnComplete(ExecutionAttemptID executionAttemptID, JobID jobId, long completedCheckpointId, long completedTimestamp, long lastSubsumedCheckpointId)
TaskManagerGateway
notifyCheckpointOnComplete
in interface TaskManagerGateway
executionAttemptID
- identifying the taskjobId
- identifying the job to which the task belongscompletedCheckpointId
- of the completed checkpointcompletedTimestamp
- of the completed checkpointlastSubsumedCheckpointId
- of the last subsumed checkpoint id,public void notifyCheckpointAborted(ExecutionAttemptID executionAttemptID, JobID jobId, long checkpointId, long latestCompletedCheckpointId, long timestamp)
TaskManagerGateway
notifyCheckpointAborted
in interface TaskManagerGateway
executionAttemptID
- identifying the taskjobId
- identifying the job to which the task belongscheckpointId
- of the subsumed checkpointlatestCompletedCheckpointId
- of the latest completed checkpointtimestamp
- of the subsumed checkpointpublic CompletableFuture<Acknowledge> triggerCheckpoint(ExecutionAttemptID executionAttemptID, JobID jobId, long checkpointId, long timestamp, CheckpointOptions checkpointOptions)
TaskManagerGateway
triggerCheckpoint
in interface TaskManagerGateway
executionAttemptID
- identifying the taskjobId
- identifying the job to which the task belongscheckpointId
- of the checkpoint to triggertimestamp
- of the checkpoint to triggercheckpointOptions
- of the checkpoint to triggerpublic CompletableFuture<Acknowledge> freeSlot(AllocationID allocationId, Throwable cause, Time timeout)
TaskManagerGateway
freeSlot
in interface TaskManagerGateway
allocationId
- identifying the slot to freecause
- of the freeing operationtimeout
- for the operationpublic CompletableFuture<Acknowledge> sendOperatorEventToTask(ExecutionAttemptID task, OperatorID operator, SerializedValue<OperatorEvent> evt)
TaskExecutorOperatorEventGateway
The reception is acknowledged (future is completed) when the event has been dispatched to
the AbstractInvokable.dispatchOperatorEvent(OperatorID,
SerializedValue)
method. It is not guaranteed that the event is processed successfully
within the implementation. These cases are up to the task and event sender to handle (for
example with an explicit response message upon success, or by triggering failure/recovery
upon exception).
sendOperatorEventToTask
in interface TaskManagerGateway
sendOperatorEventToTask
in interface TaskExecutorOperatorEventGateway
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.