public class RuntimeEnvironment extends Object implements Environment
Environment.| Constructor and Description |
|---|
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,
ClassLoader userCodeClassLoader,
MemoryManager memManager,
IOManager ioManager,
BroadcastVariableManager bcVarManager,
AccumulatorRegistry accumulatorRegistry,
InputSplitProvider splitProvider,
Map<String,Future<org.apache.flink.core.fs.Path>> distCacheEntries,
ResultPartitionWriter[] writers,
InputGate[] inputGates,
ActorGateway jobManager,
TaskManagerRuntimeInfo taskManagerInfo,
TaskMetricGroup metrics,
Task containingTask) |
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledgeCheckpoint(long checkpointId)
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,
StateHandle<?> state)
Confirms that the invokable has successfully completed all steps it needed to
to for the checkpoint with the give checkpoint-ID.
|
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.
|
InputGate[] |
getAllInputGates() |
ResultPartitionWriter[] |
getAllWriters() |
BroadcastVariableManager |
getBroadcastVariableManager() |
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.
|
InputGate |
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.
|
MemoryManager |
getMemoryManager()
Returns the current
MemoryManager. |
TaskMetricGroup |
getMetricGroup()
Returns the task specific metric group.
|
org.apache.flink.configuration.Configuration |
getTaskConfiguration()
Returns the task-wide configuration object, originally attache to the job vertex.
|
org.apache.flink.api.common.TaskInfo |
getTaskInfo()
Returns the
TaskInfo object associated with this subtask |
TaskManagerRuntimeInfo |
getTaskManagerInfo()
Gets the task manager info, with configuration and hostname.
|
ClassLoader |
getUserClassLoader()
Returns the user code class loader
|
ResultPartitionWriter |
getWriter(int index) |
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,
ClassLoader userCodeClassLoader,
MemoryManager memManager,
IOManager ioManager,
BroadcastVariableManager bcVarManager,
AccumulatorRegistry accumulatorRegistry,
InputSplitProvider splitProvider,
Map<String,Future<org.apache.flink.core.fs.Path>> distCacheEntries,
ResultPartitionWriter[] writers,
InputGate[] inputGates,
ActorGateway jobManager,
TaskManagerRuntimeInfo taskManagerInfo,
TaskMetricGroup metrics,
Task containingTask)
public org.apache.flink.api.common.ExecutionConfig getExecutionConfig()
EnvironmentExecutionConfig.getExecutionConfig in interface Environmentpublic org.apache.flink.api.common.JobID getJobID()
EnvironmentgetJobID in interface Environmentpublic JobVertexID getJobVertexId()
EnvironmentgetJobVertexId in interface Environmentpublic ExecutionAttemptID getExecutionId()
EnvironmentgetExecutionId in interface Environmentpublic org.apache.flink.api.common.TaskInfo getTaskInfo()
EnvironmentTaskInfo object associated with this subtaskgetTaskInfo in interface Environmentpublic org.apache.flink.configuration.Configuration getJobConfiguration()
EnvironmentgetJobConfiguration in interface Environmentpublic org.apache.flink.configuration.Configuration getTaskConfiguration()
EnvironmentgetTaskConfiguration in interface Environmentpublic TaskManagerRuntimeInfo getTaskManagerInfo()
EnvironmentgetTaskManagerInfo in interface Environmentpublic TaskMetricGroup getMetricGroup()
EnvironmentgetMetricGroup in interface Environmentpublic ClassLoader getUserClassLoader()
EnvironmentgetUserClassLoader in interface Environmentpublic MemoryManager getMemoryManager()
EnvironmentMemoryManager.getMemoryManager in interface EnvironmentMemoryManager.public IOManager getIOManager()
EnvironmentIOManager.getIOManager in interface EnvironmentIOManager.public BroadcastVariableManager getBroadcastVariableManager()
getBroadcastVariableManager in interface Environmentpublic AccumulatorRegistry getAccumulatorRegistry()
EnvironmentgetAccumulatorRegistry in interface Environmentpublic InputSplitProvider getInputSplitProvider()
EnvironmentgetInputSplitProvider in interface Environmentnull if no such
provider has been assigned to this environment.public Map<String,Future<org.apache.flink.core.fs.Path>> getDistributedCacheEntries()
getDistributedCacheEntries in interface Environmentpublic ResultPartitionWriter getWriter(int index)
getWriter in interface Environmentpublic ResultPartitionWriter[] getAllWriters()
getAllWriters in interface Environmentpublic InputGate getInputGate(int index)
getInputGate in interface Environmentpublic InputGate[] getAllInputGates()
getAllInputGates in interface Environmentpublic void acknowledgeCheckpoint(long checkpointId)
EnvironmentacknowledgeCheckpoint in interface EnvironmentcheckpointId - The ID of the checkpoint.public void acknowledgeCheckpoint(long checkpointId,
StateHandle<?> state)
EnvironmentacknowledgeCheckpoint in interface EnvironmentcheckpointId - The ID of the checkpoint.state - A handle to the state to be included in the checkpoint.public void failExternally(Throwable cause)
EnvironmentThis method never blocks.
failExternally in interface EnvironmentCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.