@Internal public class SavepointEnvironment extends Object implements Environment
Environment
that provides the functionality required to run the
state-processor-api
.Modifier and Type | Class and Description |
---|---|
static class |
SavepointEnvironment.Builder
SavepointEnvironment builder. |
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeCheckpoint(long checkpointId,
CheckpointMetrics checkpointMetrics)
Confirms that the invokable has successfully completed all steps it needed 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() |
BroadcastVariableManager |
getBroadcastVariableManager() |
ChannelStateWriteRequestExecutorFactory |
getChannelStateExecutorFactory() |
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.
|
JobInfo |
getJobInfo()
Returns the
JobInfo object associated with current job. |
JobType |
getJobType() |
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.
|
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. |
TaskManagerActions |
getTaskManagerActions() |
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAsyncOperationsThreadPool, getCheckpointStorageAccess, getMainMailboxExecutor, setAsyncOperationsThreadPool, setCheckpointStorageAccess, setMainMailboxExecutor
public ExecutionConfig getExecutionConfig()
Environment
ExecutionConfig
.getExecutionConfig
in interface Environment
public JobID getJobID()
Environment
getJobID
in interface Environment
public JobType getJobType()
getJobType
in interface Environment
public JobVertexID getJobVertexId()
Environment
getJobVertexId
in interface Environment
public ExecutionAttemptID getExecutionId()
Environment
getExecutionId
in interface Environment
public Configuration getTaskConfiguration()
Environment
getTaskConfiguration
in interface Environment
public TaskManagerRuntimeInfo getTaskManagerInfo()
Environment
getTaskManagerInfo
in interface Environment
public TaskMetricGroup getMetricGroup()
Environment
getMetricGroup
in interface Environment
public Configuration getJobConfiguration()
Environment
getJobConfiguration
in interface Environment
public JobInfo getJobInfo()
Environment
JobInfo
object associated with current job.getJobInfo
in interface Environment
public TaskInfo getTaskInfo()
Environment
TaskInfo
object associated with this subtask.getTaskInfo
in interface Environment
public InputSplitProvider getInputSplitProvider()
Environment
getInputSplitProvider
in interface Environment
null
if no such provider has been assigned to
this environment.public IOManager getIOManager()
Environment
IOManager
.getIOManager
in interface Environment
IOManager
.public MemoryManager getMemoryManager()
Environment
MemoryManager
.getMemoryManager
in interface Environment
MemoryManager
.public SharedResources getSharedResources()
getSharedResources
in interface Environment
public UserCodeClassLoader getUserCodeClassLoader()
Environment
getUserCodeClassLoader
in interface Environment
public Map<String,Future<Path>> getDistributedCacheEntries()
getDistributedCacheEntries
in interface Environment
public BroadcastVariableManager getBroadcastVariableManager()
getBroadcastVariableManager
in interface Environment
public TaskStateManager getTaskStateManager()
getTaskStateManager
in interface Environment
public GlobalAggregateManager getGlobalAggregateManager()
getGlobalAggregateManager
in interface Environment
public ExternalResourceInfoProvider getExternalResourceInfoProvider()
Environment
ExternalResourceInfoProvider
which contains infos of available external
resources.getExternalResourceInfoProvider
in interface Environment
ExternalResourceInfoProvider
which contains infos of available external
resourcespublic AccumulatorRegistry getAccumulatorRegistry()
Environment
getAccumulatorRegistry
in interface Environment
public TaskKvStateRegistry getTaskKvStateRegistry()
Environment
InternalKvState
instances.getTaskKvStateRegistry
in interface Environment
public void acknowledgeCheckpoint(long checkpointId, CheckpointMetrics checkpointMetrics)
Environment
acknowledgeCheckpoint
in interface Environment
checkpointId
- ID of this checkpointcheckpointMetrics
- metrics for this checkpointpublic void acknowledgeCheckpoint(long checkpointId, CheckpointMetrics checkpointMetrics, TaskStateSnapshot subtaskState)
Environment
acknowledgeCheckpoint
in interface Environment
checkpointId
- ID of this checkpointcheckpointMetrics
- metrics for this checkpointsubtaskState
- All state handles for the checkpointed statepublic void declineCheckpoint(long checkpointId, CheckpointException checkpointException)
Environment
declineCheckpoint
in interface Environment
checkpointId
- The ID of the declined checkpoint.checkpointException
- The exception why the checkpoint was declined.public TaskOperatorEventGateway getOperatorCoordinatorEventGateway()
Environment
getOperatorCoordinatorEventGateway
in interface Environment
public void failExternally(Throwable cause)
Environment
This method never blocks.
failExternally
in interface Environment
public ResultPartitionWriter getWriter(int index)
getWriter
in interface Environment
public ResultPartitionWriter[] getAllWriters()
getAllWriters
in interface Environment
public IndexedInputGate getInputGate(int index)
getInputGate
in interface Environment
public IndexedInputGate[] getAllInputGates()
getAllInputGates
in interface Environment
public TaskEventDispatcher getTaskEventDispatcher()
getTaskEventDispatcher
in interface Environment
public ChannelStateWriteRequestExecutorFactory getChannelStateExecutorFactory()
getChannelStateExecutorFactory
in interface Environment
public TaskManagerActions getTaskManagerActions()
getTaskManagerActions
in interface Environment
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.