public interface TaskExecutorGateway extends RpcGateway, TaskExecutorOperatorEventGateway, TaskExecutorThreadInfoGateway
TaskExecutor
RPC gateway interface.Modifier and Type | Method and Description |
---|---|
CompletableFuture<Acknowledge> |
abortCheckpoint(ExecutionAttemptID executionAttemptID,
long checkpointId,
long latestCompletedCheckpointId,
long checkpointTimestamp)
Abort a checkpoint for the given task.
|
CompletableFuture<Boolean> |
canBeReleased()
Checks whether the task executor can be released.
|
CompletableFuture<Acknowledge> |
cancelTask(ExecutionAttemptID executionAttemptID,
Duration timeout)
Cancel the given task.
|
CompletableFuture<Acknowledge> |
confirmCheckpoint(ExecutionAttemptID executionAttemptID,
long completedCheckpointId,
long completedCheckpointTimestamp,
long lastSubsumedCheckpointId)
Confirm a checkpoint for the given task.
|
void |
disconnectJobManager(JobID jobId,
Exception cause)
Disconnects the given JobManager from the TaskManager.
|
void |
disconnectResourceManager(Exception cause)
Disconnects the ResourceManager from the TaskManager.
|
void |
freeInactiveSlots(JobID jobId,
Duration timeout)
Frees all currently inactive slot allocated for the given job.
|
CompletableFuture<Acknowledge> |
freeSlot(AllocationID allocationId,
Throwable cause,
Duration timeout)
Frees the slot with the given allocation ID.
|
default CompletableFuture<Collection<PartitionWithMetrics>> |
getAndRetainPartitionWithMetrics(JobID jobId)
Get and retain all partitions and their metrics located on this task executor, the metrics
mainly includes the meta information of partition(partition bytes, etc).
|
CompletableFuture<Void> |
heartbeatFromJobManager(ResourceID heartbeatOrigin,
AllocatedSlotReport allocatedSlotReport)
Heartbeat request from the job manager.
|
CompletableFuture<Void> |
heartbeatFromResourceManager(ResourceID heartbeatOrigin)
Heartbeat request from the resource manager.
|
CompletableFuture<Acknowledge> |
promotePartitions(JobID jobId,
Set<ResultPartitionID> partitionIds)
Batch promote intermediate result partitions.
|
CompletableFuture<Acknowledge> |
releaseClusterPartitions(Collection<IntermediateDataSetID> dataSetsToRelease,
Duration timeout)
Releases all cluster partitions belong to any of the given data sets.
|
void |
releasePartitions(JobID jobId,
Set<ResultPartitionID> partitionIds)
Batch release intermediate result partitions.
|
CompletableFuture<TransientBlobKey> |
requestFileUploadByName(String fileName,
Duration timeout)
Requests the file upload of the specified name to the cluster's
BlobServer . |
CompletableFuture<TransientBlobKey> |
requestFileUploadByNameAndType(String fileName,
FileType fileType,
Duration timeout)
Requests the file upload of the specified name and file type to the cluster's
BlobServer . |
CompletableFuture<TransientBlobKey> |
requestFileUploadByType(FileType fileType,
Duration timeout)
Requests the file upload of the specified type to the cluster's
BlobServer . |
CompletableFuture<Collection<LogInfo>> |
requestLogList(Duration timeout)
Requests for the historical log file names on the TaskManager.
|
CompletableFuture<SerializableOptional<String>> |
requestMetricQueryServiceAddress(Duration timeout)
Returns the gateway of Metric Query Service on the TaskManager.
|
CompletableFuture<ProfilingInfo> |
requestProfiling(int duration,
ProfilingInfo.ProfilingMode mode,
Duration timeout)
Requests the profiling from this TaskManager.
|
CompletableFuture<Collection<ProfilingInfo>> |
requestProfilingList(Duration timeout)
Requests for the historical profiling file names on the TaskManager.
|
CompletableFuture<Acknowledge> |
requestSlot(SlotID slotId,
JobID jobId,
AllocationID allocationId,
ResourceProfile resourceProfile,
String targetAddress,
ResourceManagerId resourceManagerId,
Duration timeout)
Requests a slot from the TaskManager.
|
CompletableFuture<ThreadDumpInfo> |
requestThreadDump(Duration timeout)
Requests the thread dump from this TaskManager.
|
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,
JobMasterId jobMasterId,
Duration timeout)
Submit a
Task to the TaskExecutor . |
CompletableFuture<Acknowledge> |
triggerCheckpoint(ExecutionAttemptID executionAttemptID,
long checkpointID,
long checkpointTimestamp,
CheckpointOptions checkpointOptions)
Trigger the checkpoint for the given task.
|
CompletableFuture<Acknowledge> |
updateDelegationTokens(ResourceManagerId resourceManagerId,
byte[] tokens)
Sends new delegation tokens to this TaskManager.
|
CompletableFuture<Acknowledge> |
updatePartitions(ExecutionAttemptID executionAttemptID,
Iterable<PartitionInfo> partitionInfos,
Duration timeout)
Update the task where the given partitions can be found.
|
getAddress, getHostname
requestThreadInfoSamples
CompletableFuture<Acknowledge> requestSlot(SlotID slotId, JobID jobId, AllocationID allocationId, ResourceProfile resourceProfile, String targetAddress, ResourceManagerId resourceManagerId, Duration timeout)
slotId
- slot id for the requestjobId
- for which to request a slotallocationId
- id for the requestresourceProfile
- of requested slot, used only for dynamic slot allocation and will be
ignored otherwisetargetAddress
- to which to offer the requested slotsresourceManagerId
- current leader id of the ResourceManagertimeout
- for the operationCompletableFuture<Acknowledge> submitTask(TaskDeploymentDescriptor tdd, JobMasterId jobMasterId, Duration timeout)
Task
to the TaskExecutor
.tdd
- describing the task to submitjobMasterId
- identifying the submitting JobMastertimeout
- of the submit operationCompletableFuture<Acknowledge> updatePartitions(ExecutionAttemptID executionAttemptID, Iterable<PartitionInfo> partitionInfos, Duration timeout)
executionAttemptID
- identifying the taskpartitionInfos
- telling where the partition can be retrieved fromtimeout
- for the update partitions operationvoid releasePartitions(JobID jobId, Set<ResultPartitionID> partitionIds)
jobId
- id of the job that the partitions belong topartitionIds
- partition ids to releaseCompletableFuture<Acknowledge> promotePartitions(JobID jobId, Set<ResultPartitionID> partitionIds)
jobId
- id of the job that the partitions belong topartitionIds
- partition ids to releaseCompletableFuture<Acknowledge> releaseClusterPartitions(Collection<IntermediateDataSetID> dataSetsToRelease, Duration timeout)
dataSetsToRelease
- data sets for which all cluster partitions should be releasedtimeout
- for the partitions release operationCompletableFuture<Acknowledge> triggerCheckpoint(ExecutionAttemptID executionAttemptID, long checkpointID, long checkpointTimestamp, CheckpointOptions checkpointOptions)
executionAttemptID
- identifying the taskcheckpointID
- unique id for the checkpointcheckpointTimestamp
- is the timestamp when the checkpoint has been initiatedcheckpointOptions
- for performing the checkpointCompletableFuture<Acknowledge> confirmCheckpoint(ExecutionAttemptID executionAttemptID, long completedCheckpointId, long completedCheckpointTimestamp, long lastSubsumedCheckpointId)
executionAttemptID
- identifying the taskcompletedCheckpointId
- unique id for the completed checkpointcompletedCheckpointTimestamp
- is the timestamp when the checkpoint has been initiatedlastSubsumedCheckpointId
- unique id for the checkpoint to be subsumedCompletableFuture<Acknowledge> abortCheckpoint(ExecutionAttemptID executionAttemptID, long checkpointId, long latestCompletedCheckpointId, long checkpointTimestamp)
executionAttemptID
- identifying the taskcheckpointId
- unique id for the checkpointlatestCompletedCheckpointId
- the id of the latest completed checkpointcheckpointTimestamp
- is the timestamp when the checkpoint has been initiatedCompletableFuture<Acknowledge> cancelTask(ExecutionAttemptID executionAttemptID, Duration timeout)
executionAttemptID
- identifying the tasktimeout
- for the cancel operationCompletableFuture<Void> heartbeatFromJobManager(ResourceID heartbeatOrigin, AllocatedSlotReport allocatedSlotReport)
heartbeatOrigin
- unique id of the job managerCompletableFuture<Void> heartbeatFromResourceManager(ResourceID heartbeatOrigin)
heartbeatOrigin
- unique id of the resource managervoid disconnectJobManager(JobID jobId, Exception cause)
jobId
- JobID for which the JobManager was the leadercause
- for the disconnection from the JobManagervoid disconnectResourceManager(Exception cause)
cause
- for the disconnection from the ResourceManagerCompletableFuture<Acknowledge> freeSlot(AllocationID allocationId, Throwable cause, Duration timeout)
allocationId
- identifying the slot to freecause
- of the freeing operationtimeout
- for the operationvoid freeInactiveSlots(JobID jobId, Duration timeout)
jobId
- job for which all inactive slots should be releasedtimeout
- for the operationCompletableFuture<TransientBlobKey> requestFileUploadByType(FileType fileType, Duration timeout)
BlobServer
.fileType
- to uploadtimeout
- for the asynchronous operationTransientBlobKey
of the uploaded file.CompletableFuture<TransientBlobKey> requestFileUploadByName(String fileName, Duration timeout)
BlobServer
.fileName
- to uploadtimeout
- for the asynchronous operationTransientBlobKey
of the uploaded file.CompletableFuture<TransientBlobKey> requestFileUploadByNameAndType(String fileName, FileType fileType, Duration timeout)
BlobServer
.fileName
- to uploadfileType
- to uploadtimeout
- for the asynchronous operationTransientBlobKey
of the uploaded file.CompletableFuture<SerializableOptional<String>> requestMetricQueryServiceAddress(Duration timeout)
CompletableFuture<Boolean> canBeReleased()
CompletableFuture<Collection<LogInfo>> requestLogList(Duration timeout)
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 TaskExecutorOperatorEventGateway
CompletableFuture<ThreadDumpInfo> requestThreadDump(Duration timeout)
timeout
- timeout for the asynchronous operationThreadDumpInfo
for this TaskManager.CompletableFuture<Acknowledge> updateDelegationTokens(ResourceManagerId resourceManagerId, byte[] tokens)
resourceManagerId
- current leader id of the ResourceManagertokens
- new tokensdefault CompletableFuture<Collection<PartitionWithMetrics>> getAndRetainPartitionWithMetrics(JobID jobId)
jobId
- ID of the target jobCompletableFuture<ProfilingInfo> requestProfiling(int duration, ProfilingInfo.ProfilingMode mode, Duration timeout)
duration
- profiling durationmode
- profiling mode ProfilingInfo.ProfilingMode
timeout
- timeout for the asynchronous operationProfilingInfo
for this TaskManager.CompletableFuture<Collection<ProfilingInfo>> requestProfilingList(Duration timeout)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.