public class RuntimeEnvironment extends Object implements Environment
Environment.| Constructor and Description |
|---|
RuntimeEnvironment(org.apache.flink.api.common.JobID jobId,
JobVertexID jobVertexId,
ExecutionAttemptID executionId,
String taskName,
String taskNameWithSubtasks,
int subtaskIndex,
int parallelism,
org.apache.flink.configuration.Configuration jobConfiguration,
org.apache.flink.configuration.Configuration taskConfiguration,
ClassLoader userCodeClassLoader,
MemoryManager memManager,
IOManager ioManager,
BroadcastVariableManager bcVarManager,
InputSplitProvider splitProvider,
Map<String,Future<org.apache.flink.core.fs.Path>> distCacheEntries,
ResultPartitionWriter[] writers,
InputGate[] inputGates,
akka.actor.ActorRef jobManagerActor) |
| 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.
|
InputGate[] |
getAllInputGates() |
ResultPartitionWriter[] |
getAllWriters() |
BroadcastVariableManager |
getBroadcastVariableManager() |
Map<String,Future<org.apache.flink.core.fs.Path>> |
getDistributedCacheEntries() |
ExecutionAttemptID |
getExecutionId()
Gets the ID of the task execution attempt.
|
int |
getIndexInSubtaskGroup()
Returns the index of this subtask in the subtask group.
|
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. |
int |
getNumberOfSubtasks()
Returns the current number of subtasks the respective task is split into.
|
org.apache.flink.configuration.Configuration |
getTaskConfiguration()
Returns the task-wide configuration object, originally attache to the job vertex.
|
String |
getTaskName()
Returns the name of the task running in this environment.
|
String |
getTaskNameWithSubtasks()
Returns the name of the task running in this environment, appended
with the subtask indicator, such as "MyTask (3/6)", where
3 would be (
Environment.getIndexInSubtaskGroup() + 1), and 6 would be
Environment.getNumberOfSubtasks(). |
ClassLoader |
getUserClassLoader()
Returns the user code class loader
|
ResultPartitionWriter |
getWriter(int index) |
void |
reportAccumulators(Map<String,org.apache.flink.api.common.accumulators.Accumulator<?,?>> accumulators)
Reports the given set of accumulators to the JobManager.
|
public RuntimeEnvironment(org.apache.flink.api.common.JobID jobId,
JobVertexID jobVertexId,
ExecutionAttemptID executionId,
String taskName,
String taskNameWithSubtasks,
int subtaskIndex,
int parallelism,
org.apache.flink.configuration.Configuration jobConfiguration,
org.apache.flink.configuration.Configuration taskConfiguration,
ClassLoader userCodeClassLoader,
MemoryManager memManager,
IOManager ioManager,
BroadcastVariableManager bcVarManager,
InputSplitProvider splitProvider,
Map<String,Future<org.apache.flink.core.fs.Path>> distCacheEntries,
ResultPartitionWriter[] writers,
InputGate[] inputGates,
akka.actor.ActorRef jobManagerActor)
public org.apache.flink.api.common.JobID getJobID()
EnvironmentgetJobID in interface Environmentpublic JobVertexID getJobVertexId()
EnvironmentgetJobVertexId in interface Environmentpublic ExecutionAttemptID getExecutionId()
EnvironmentgetExecutionId in interface Environmentpublic String getTaskName()
EnvironmentgetTaskName in interface Environmentpublic String getTaskNameWithSubtasks()
EnvironmentEnvironment.getIndexInSubtaskGroup() + 1), and 6 would be
Environment.getNumberOfSubtasks().getTaskNameWithSubtasks in interface Environmentpublic int getNumberOfSubtasks()
EnvironmentgetNumberOfSubtasks in interface Environmentpublic int getIndexInSubtaskGroup()
EnvironmentEnvironment.getNumberOfSubtasks() - 1.getIndexInSubtaskGroup in interface Environmentpublic org.apache.flink.configuration.Configuration getJobConfiguration()
EnvironmentgetJobConfiguration in interface Environmentpublic org.apache.flink.configuration.Configuration getTaskConfiguration()
EnvironmentgetTaskConfiguration 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 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 reportAccumulators(Map<String,org.apache.flink.api.common.accumulators.Accumulator<?,?>> accumulators)
EnvironmentreportAccumulators in interface Environmentaccumulators - The accumulators to report.public 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.Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.