public class RuntimeEnvironment extends Object implements Environment
Environment.| 构造器和说明 |
|---|
RuntimeEnvironment(org.apache.flink.api.common.JobID jobId,
JobVertexID jobVertexId,
ExecutionAttemptID executionId,
org.apache.flink.api.common.ExecutionConfig executionConfig,
org.apache.flink.api.common.TaskInfo taskInfo,
org.apache.flink.configuration.Configuration jobConfiguration,
org.apache.flink.configuration.Configuration taskConfiguration,
org.apache.flink.util.UserCodeClassLoader userCodeClassLoader,
MemoryManager memManager,
IOManager ioManager,
BroadcastVariableManager bcVarManager,
TaskStateManager taskStateManager,
GlobalAggregateManager aggregateManager,
AccumulatorRegistry accumulatorRegistry,
TaskKvStateRegistry kvStateRegistry,
InputSplitProvider splitProvider,
Map<String,Future<org.apache.flink.core.fs.Path>> distCacheEntries,
ResultPartitionWriter[] writers,
IndexedInputGate[] inputGates,
TaskEventDispatcher taskEventDispatcher,
CheckpointResponder checkpointResponder,
TaskOperatorEventGateway operatorEventGateway,
TaskManagerRuntimeInfo taskManagerInfo,
TaskMetricGroup metrics,
Task containingTask,
ExternalResourceInfoProvider externalResourceInfoProvider) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 checkpointStateHandles)
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() |
ExecutorService |
getAsyncOperationsThreadPool() |
BroadcastVariableManager |
getBroadcastVariableManager() |
CheckpointStorageAccess |
getCheckpointStorageAccess() |
Map<String,Future<org.apache.flink.core.fs.Path>> |
getDistributedCacheEntries() |
org.apache.flink.api.common.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. |
org.apache.flink.configuration.Configuration |
getJobConfiguration()
Returns the job-wide configuration object that was attached to the JobGraph.
|
org.apache.flink.api.common.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.
|
org.apache.flink.api.common.operators.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.
|
org.apache.flink.configuration.Configuration |
getTaskConfiguration()
Returns the task-wide configuration object, originally attached to the job vertex.
|
TaskEventDispatcher |
getTaskEventDispatcher() |
org.apache.flink.api.common.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() |
org.apache.flink.util.UserCodeClassLoader |
getUserCodeClassLoader()
Returns the user code class loader
|
ResultPartitionWriter |
getWriter(int index) |
void |
setAsyncOperationsThreadPool(ExecutorService executorService) |
void |
setCheckpointStorageAccess(CheckpointStorageAccess checkpointStorageAccess) |
void |
setMainMailboxExecutor(org.apache.flink.api.common.operators.MailboxExecutor mainMailboxExecutor) |
public RuntimeEnvironment(org.apache.flink.api.common.JobID jobId,
JobVertexID jobVertexId,
ExecutionAttemptID executionId,
org.apache.flink.api.common.ExecutionConfig executionConfig,
org.apache.flink.api.common.TaskInfo taskInfo,
org.apache.flink.configuration.Configuration jobConfiguration,
org.apache.flink.configuration.Configuration taskConfiguration,
org.apache.flink.util.UserCodeClassLoader userCodeClassLoader,
MemoryManager memManager,
IOManager ioManager,
BroadcastVariableManager bcVarManager,
TaskStateManager taskStateManager,
GlobalAggregateManager aggregateManager,
AccumulatorRegistry accumulatorRegistry,
TaskKvStateRegistry kvStateRegistry,
InputSplitProvider splitProvider,
Map<String,Future<org.apache.flink.core.fs.Path>> distCacheEntries,
ResultPartitionWriter[] writers,
IndexedInputGate[] inputGates,
TaskEventDispatcher taskEventDispatcher,
CheckpointResponder checkpointResponder,
TaskOperatorEventGateway operatorEventGateway,
TaskManagerRuntimeInfo taskManagerInfo,
TaskMetricGroup metrics,
Task containingTask,
ExternalResourceInfoProvider externalResourceInfoProvider)
public org.apache.flink.api.common.ExecutionConfig getExecutionConfig()
EnvironmentExecutionConfig.getExecutionConfig 在接口中 Environmentpublic org.apache.flink.api.common.JobID getJobID()
EnvironmentgetJobID 在接口中 Environmentpublic JobVertexID getJobVertexId()
EnvironmentgetJobVertexId 在接口中 Environmentpublic ExecutionAttemptID getExecutionId()
EnvironmentgetExecutionId 在接口中 Environmentpublic org.apache.flink.api.common.TaskInfo getTaskInfo()
EnvironmentTaskInfo object associated with this subtaskgetTaskInfo 在接口中 Environmentpublic org.apache.flink.configuration.Configuration getJobConfiguration()
EnvironmentgetJobConfiguration 在接口中 Environmentpublic org.apache.flink.configuration.Configuration getTaskConfiguration()
EnvironmentgetTaskConfiguration 在接口中 Environmentpublic TaskManagerRuntimeInfo getTaskManagerInfo()
EnvironmentgetTaskManagerInfo 在接口中 Environmentpublic TaskMetricGroup getMetricGroup()
EnvironmentgetMetricGroup 在接口中 Environmentpublic org.apache.flink.util.UserCodeClassLoader getUserCodeClassLoader()
EnvironmentgetUserCodeClassLoader 在接口中 Environmentpublic MemoryManager getMemoryManager()
EnvironmentMemoryManager.getMemoryManager 在接口中 EnvironmentMemoryManager.public IOManager getIOManager()
EnvironmentIOManager.getIOManager 在接口中 EnvironmentIOManager.public BroadcastVariableManager getBroadcastVariableManager()
getBroadcastVariableManager 在接口中 Environmentpublic TaskStateManager getTaskStateManager()
getTaskStateManager 在接口中 Environmentpublic GlobalAggregateManager getGlobalAggregateManager()
getGlobalAggregateManager 在接口中 Environmentpublic AccumulatorRegistry getAccumulatorRegistry()
EnvironmentgetAccumulatorRegistry 在接口中 Environmentpublic TaskKvStateRegistry getTaskKvStateRegistry()
EnvironmentInternalKvState instances.getTaskKvStateRegistry 在接口中 Environmentpublic InputSplitProvider getInputSplitProvider()
EnvironmentgetInputSplitProvider 在接口中 Environmentnull if no such provider has been assigned to
this environment.public Map<String,Future<org.apache.flink.core.fs.Path>> getDistributedCacheEntries()
getDistributedCacheEntries 在接口中 Environmentpublic ResultPartitionWriter getWriter(int index)
getWriter 在接口中 Environmentpublic ResultPartitionWriter[] getAllWriters()
getAllWriters 在接口中 Environmentpublic IndexedInputGate getInputGate(int index)
getInputGate 在接口中 Environmentpublic IndexedInputGate[] getAllInputGates()
getAllInputGates 在接口中 Environmentpublic TaskEventDispatcher getTaskEventDispatcher()
getTaskEventDispatcher 在接口中 Environmentpublic ExternalResourceInfoProvider getExternalResourceInfoProvider()
EnvironmentExternalResourceInfoProvider which contains infos of available external
resources.getExternalResourceInfoProvider 在接口中 EnvironmentExternalResourceInfoProvider which contains infos of available external
resourcespublic void acknowledgeCheckpoint(long checkpointId,
CheckpointMetrics checkpointMetrics)
EnvironmentacknowledgeCheckpoint 在接口中 EnvironmentcheckpointId - ID of this checkpointcheckpointMetrics - metrics for this checkpointpublic void acknowledgeCheckpoint(long checkpointId,
CheckpointMetrics checkpointMetrics,
TaskStateSnapshot checkpointStateHandles)
EnvironmentacknowledgeCheckpoint 在接口中 EnvironmentcheckpointId - ID of this checkpointcheckpointMetrics - metrics for this checkpointcheckpointStateHandles - All state handles for the checkpointed statepublic void declineCheckpoint(long checkpointId,
CheckpointException checkpointException)
EnvironmentdeclineCheckpoint 在接口中 EnvironmentcheckpointId - The ID of the declined checkpoint.checkpointException - The exception why the checkpoint was declined.public TaskOperatorEventGateway getOperatorCoordinatorEventGateway()
Environmentpublic void failExternally(Throwable cause)
EnvironmentThis method never blocks.
failExternally 在接口中 Environmentpublic void setMainMailboxExecutor(org.apache.flink.api.common.operators.MailboxExecutor mainMailboxExecutor)
setMainMailboxExecutor 在接口中 Environmentpublic org.apache.flink.api.common.operators.MailboxExecutor getMainMailboxExecutor()
getMainMailboxExecutor 在接口中 Environmentpublic void setAsyncOperationsThreadPool(ExecutorService executorService)
setAsyncOperationsThreadPool 在接口中 Environmentpublic ExecutorService getAsyncOperationsThreadPool()
getAsyncOperationsThreadPool 在接口中 Environmentpublic void setCheckpointStorageAccess(CheckpointStorageAccess checkpointStorageAccess)
setCheckpointStorageAccess 在接口中 Environmentpublic CheckpointStorageAccess getCheckpointStorageAccess()
getCheckpointStorageAccess 在接口中 EnvironmentCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.