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,
Throwable cause)
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() |
BroadcastVariableManager |
getBroadcastVariableManager() |
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.
|
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.
|
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() |
ClassLoader |
getUserClassLoader()
Returns the user code class loader
|
ResultPartitionWriter |
getWriter(int index) |
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
.ClassLoader getUserClassLoader()
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, Throwable cause)
checkpointId
- The ID of the declined checkpoint.cause
- An optional reason 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()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.