public class DefaultExecutionListener extends Object implements ExecutionListener
| Constructor and Description |
|---|
DefaultExecutionListener(DefaultScheduler scheduler,
ExecutionVertex executionVertex)
Constructs a new wrapper object for the given
ExecutionVertex. |
| Modifier and Type | Method and Description |
|---|---|
void |
executionStateChanged(JobID jobID,
ExecutionVertexID vertexID,
ExecutionState newExecutionState,
String optionalMessage)
Called when the execution state of the associated task has changed.
|
int |
getPriority()
Returns the priority of the execution listener object.
|
void |
userThreadFinished(JobID jobID,
ExecutionVertexID vertexID,
Thread userThread)
Called when a thread spawn by a user task has finished.
|
void |
userThreadStarted(JobID jobID,
ExecutionVertexID vertexID,
Thread userThread)
Called when the user task has started a new thread.
|
public DefaultExecutionListener(DefaultScheduler scheduler, ExecutionVertex executionVertex)
ExecutionVertex.scheduler - the instance of the DefaultSchedulerexecutionVertex - the ExecutionVertex the received notification refer topublic void executionStateChanged(JobID jobID, ExecutionVertexID vertexID, ExecutionState newExecutionState, String optionalMessage)
ExecutionListenernewExecutionState may be out-dated by the time a particular execution listener is called.
To determine the most recent state of the respective task, it is recommended to store a reference on the
execution that represents it and then call getExecutionState() on the vertex within this method.executionStateChanged in interface ExecutionListenerjobID - the ID of the job the task belongs tovertexID - the ID of the task whose state has changednewExecutionState - the execution state the task has just switched tooptionalMessage - an optional message providing further information on the state changepublic void userThreadFinished(JobID jobID, ExecutionVertexID vertexID, Thread userThread)
ExecutionListeneruserThreadFinished in interface ExecutionListenerjobID - the ID of the job the task belongs tovertexID - the ID of the task whose thread has finisheduserThread - the user thread which has finishedpublic void userThreadStarted(JobID jobID, ExecutionVertexID vertexID, Thread userThread)
ExecutionListeneruserThreadStarted in interface ExecutionListenerjobID - the ID of the job the task belongs tovertexID - the ID of the task that started of new threaduserThread - the user thread which has been startedpublic int getPriority()
ExecutionListenergetPriority in interface ExecutionListenerCopyright © 2014 The Apache Software Foundation. All rights reserved.