public abstract class AbstractInvokable extends Object
| Constructor and Description |
|---|
AbstractInvokable() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
This method is called when a task is canceled either as a result of a user abort or an execution failure.
|
int |
getCurrentNumberOfSubtasks()
Returns the current number of subtasks the respective task is split into.
|
Environment |
getEnvironment()
Returns the environment of this task.
|
int |
getIndexInSubtaskGroup()
Returns the index of this subtask in the subtask group.
|
Configuration |
getJobConfiguration()
Returns the job configuration object which was attached to the original
JobGraph. |
Configuration |
getTaskConfiguration()
Returns the task configuration object which was attached to the original
JobVertex. |
abstract void |
invoke()
Must be overwritten by the concrete task.
|
abstract void |
registerInputOutput()
Must be overwritten by the concrete task to instantiate the required record reader and record writer.
|
void |
setEnvironment(Environment environment)
Sets the environment of this task.
|
void |
userThreadFinished(Thread userThread)
This method should be called by the user code if a custom
user thread has finished.
|
void |
userThreadStarted(Thread userThread)
This method should be called by the user code if a custom
user thread has been started.
|
public abstract void registerInputOutput()
public abstract void invoke()
throws Exception
Execution - thrown if any exception occurs during the execution of the tasksExceptionpublic final void setEnvironment(Environment environment)
environment - the environment of this taskpublic Environment getEnvironment()
null if the environment has not yet been setpublic final int getCurrentNumberOfSubtasks()
public final int getIndexInSubtaskGroup()
public final Configuration getTaskConfiguration()
JobVertex.JobVertexpublic final Configuration getJobConfiguration()
JobGraph.JobGraphpublic final void userThreadStarted(Thread userThread)
userThread - the user thread which has been startedpublic final void userThreadFinished(Thread userThread)
userThread - the user thread which has finishedpublic void cancel()
throws Exception
Exception - thrown if any exception occurs during the execution of the user codeCopyright © 2014 The Apache Software Foundation. All rights reserved.