public interface Environment
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeCheckpoint(long checkpointId,
CheckpointMetrics checkpointMetrics)
Confirms that the invokable has successfully completed all steps it needed to to for the
checkpoint with the give checkpoint-ID.
|
void |
acknowledgeCheckpoint(long checkpointId,
CheckpointMetrics checkpointMetrics,
TaskStateSnapshot subtaskState)
Confirms that the invokable has successfully completed all required steps for the checkpoint
with the give checkpoint-ID.
|
void |
declineCheckpoint(long checkpointId,
CheckpointException checkpointException)
Declines a checkpoint.
|
void |
failExternally(Throwable cause)
Marks task execution failed for an external reason (a reason other than the task code itself
throwing an exception).
|
AccumulatorRegistry |
getAccumulatorRegistry()
Return the registry for accumulators which are periodically sent to the job manager.
|
IndexedInputGate[] |
getAllInputGates() |
ResultPartitionWriter[] |
getAllWriters() |
default ExecutorService |
getAsyncOperationsThreadPool() |
BroadcastVariableManager |
getBroadcastVariableManager() |
ChannelStateWriteRequestExecutorFactory |
getChannelStateExecutorFactory() |
default CheckpointStorageAccess |
getCheckpointStorageAccess() |
Map<String,Future<Path>> |
getDistributedCacheEntries() |
ExecutionConfig |
getExecutionConfig()
Returns the job specific
ExecutionConfig . |
ExecutionAttemptID |
getExecutionId()
Gets the ID of the task execution attempt.
|
ExternalResourceInfoProvider |
getExternalResourceInfoProvider()
Get the
ExternalResourceInfoProvider which contains infos of available external
resources. |
GlobalAggregateManager |
getGlobalAggregateManager() |
IndexedInputGate |
getInputGate(int index) |
InputSplitProvider |
getInputSplitProvider()
Returns the input split provider assigned to this environment.
|
IOManager |
getIOManager()
Returns the current
IOManager . |
Configuration |
getJobConfiguration()
Returns the job-wide configuration object that was attached to the JobGraph.
|
JobID |
getJobID()
Returns the ID of the job that the task belongs to.
|
JobVertexID |
getJobVertexId()
Gets the ID of the JobVertex for which this task executes a parallel subtask.
|
default MailboxExecutor |
getMainMailboxExecutor() |
MemoryManager |
getMemoryManager()
Returns the current
MemoryManager . |
TaskMetricGroup |
getMetricGroup()
Returns the task specific metric group.
|
TaskOperatorEventGateway |
getOperatorCoordinatorEventGateway()
Gets the gateway through which operators can send events to the operator coordinators.
|
SharedResources |
getSharedResources() |
Configuration |
getTaskConfiguration()
Returns the task-wide configuration object, originally attached to the job vertex.
|
TaskEventDispatcher |
getTaskEventDispatcher() |
TaskInfo |
getTaskInfo()
Returns the
TaskInfo object associated with this subtask |
TaskKvStateRegistry |
getTaskKvStateRegistry()
Returns the registry for
InternalKvState instances. |
TaskManagerRuntimeInfo |
getTaskManagerInfo()
Gets the task manager info, with configuration and hostname.
|
TaskStateManager |
getTaskStateManager() |
UserCodeClassLoader |
getUserCodeClassLoader()
Returns the user code class loader
|
ResultPartitionWriter |
getWriter(int index) |
default void |
setAsyncOperationsThreadPool(ExecutorService executorService) |
default void |
setCheckpointStorageAccess(CheckpointStorageAccess checkpointStorageAccess) |
default void |
setMainMailboxExecutor(MailboxExecutor mainMailboxExecutor) |
ExecutionConfig getExecutionConfig()
ExecutionConfig
.JobID getJobID()
JobVertexID getJobVertexId()
ExecutionAttemptID getExecutionId()
Configuration getTaskConfiguration()
TaskManagerRuntimeInfo getTaskManagerInfo()
TaskMetricGroup getMetricGroup()
Configuration getJobConfiguration()
TaskInfo getTaskInfo()
TaskInfo
object associated with this subtaskInputSplitProvider getInputSplitProvider()
null
if no such provider has been assigned to
this environment.TaskOperatorEventGateway getOperatorCoordinatorEventGateway()
IOManager getIOManager()
IOManager
.IOManager
.MemoryManager getMemoryManager()
MemoryManager
.MemoryManager
.SharedResources getSharedResources()
UserCodeClassLoader getUserCodeClassLoader()
BroadcastVariableManager getBroadcastVariableManager()
TaskStateManager getTaskStateManager()
GlobalAggregateManager getGlobalAggregateManager()
ExternalResourceInfoProvider getExternalResourceInfoProvider()
ExternalResourceInfoProvider
which contains infos of available external
resources.ExternalResourceInfoProvider
which contains infos of available external
resourcesAccumulatorRegistry getAccumulatorRegistry()
TaskKvStateRegistry getTaskKvStateRegistry()
InternalKvState
instances.void acknowledgeCheckpoint(long checkpointId, CheckpointMetrics checkpointMetrics)
checkpointId
- ID of this checkpointcheckpointMetrics
- metrics for this checkpointvoid acknowledgeCheckpoint(long checkpointId, CheckpointMetrics checkpointMetrics, TaskStateSnapshot subtaskState)
checkpointId
- ID of this checkpointcheckpointMetrics
- metrics for this checkpointsubtaskState
- All state handles for the checkpointed statevoid declineCheckpoint(long checkpointId, CheckpointException checkpointException)
checkpointId
- The ID of the declined checkpoint.checkpointException
- The exception why the checkpoint was declined.void failExternally(Throwable cause)
This method never blocks.
ResultPartitionWriter getWriter(int index)
ResultPartitionWriter[] getAllWriters()
IndexedInputGate getInputGate(int index)
IndexedInputGate[] getAllInputGates()
TaskEventDispatcher getTaskEventDispatcher()
default void setMainMailboxExecutor(MailboxExecutor mainMailboxExecutor)
default MailboxExecutor getMainMailboxExecutor()
default void setAsyncOperationsThreadPool(ExecutorService executorService)
default ExecutorService getAsyncOperationsThreadPool()
default void setCheckpointStorageAccess(CheckpointStorageAccess checkpointStorageAccess)
default CheckpointStorageAccess getCheckpointStorageAccess()
ChannelStateWriteRequestExecutorFactory getChannelStateExecutorFactory()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.