public interface JobLifecycleObserver
JobLifecycleObserver
is the interface which needs to be
implemented by an entity which wishes to observe the execution of a Job and
its constituent tasks. As the job progresses in it's execution phase, the
observer is used to report on the highlights -- such as the start and end of
a task -- of the job's execution.Modifier and Type | Method and Description |
---|---|
void |
completedExecution(String jobIdentifier,
String taskIdentifier,
TaskLifecycleMetrics taskLifecycleMetrics)
This method is invoked when a task has completed execution either
successfully or due to an abnormal termination or previously issued abort
request.
|
void |
completedSuccessfully(String jobIdentifier,
ProgressTracker progressTracker)
This method is invoked when all the constituent distributed tasks have
finished executing successfully.
|
void |
completedWithErrors(String jobIdentifier,
ProgressTracker progressTracker)
This method is invoked when we have heard from all the sub-tasks, and one
or more errors have been encountered in the execution of constituent
tasks.
|
void |
startedExecution(String jobIdentifier,
String taskIdentifier,
TaskLifecycleMetrics taskLifecycleMetrics)
This method is invoked when the first task reports that it has
begun execution.
|
void completedSuccessfully(String jobIdentifier, ProgressTracker progressTracker)
jobIdentifier
- The ID of the Job being reported onprogressTracker
- Contains information about the lifecycle metrics associated
with the constituent tasks.void completedWithErrors(String jobIdentifier, ProgressTracker progressTracker)
jobIdentifier
- The ID of the Job being reported onprogressTracker
- Contains information about the lifecycle metrics associated
with the constituent tasks.void startedExecution(String jobIdentifier, String taskIdentifier, TaskLifecycleMetrics taskLifecycleMetrics)
jobIdentifier
- The ID of the Job being reported ontaskIdentifier
- The taskId of one of the constituent tasks that has started
execution.taskLifecycleMetrics
- The metrics associated with the task in question.void completedExecution(String jobIdentifier, String taskIdentifier, TaskLifecycleMetrics taskLifecycleMetrics)
taskLifecycleMetrics.getExecutionStatus()
method and
comparing it to the constants in the metrics, reveals the completion
status of the task.jobIdentifier
- The ID of the Job being reported ontaskIdentifier
- The taskId of one of the constituent taskstaskLifecycleMetrics
- The metrics associated with the task in question.Copyright © 2015. All rights reserved.