org.apache.hadoop.mapreduce.v2.app
Interface TaskAttemptListener

All Known Implementing Classes:
TaskAttemptListenerImpl

public interface TaskAttemptListener

This class listens for changes to the state of a Task.


Method Summary
 InetSocketAddress getAddress()
           
 void registerLaunchedTask(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID, WrappedJvmID jvmID)
          Register task attempt.
 void registerPendingTask(org.apache.hadoop.mapred.Task task, WrappedJvmID jvmID)
          Register a JVM with the listener.
 void unregister(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID, WrappedJvmID jvmID)
          Unregister the JVM and the attempt associated with it.
 

Method Detail

getAddress

InetSocketAddress getAddress()

registerPendingTask

void registerPendingTask(org.apache.hadoop.mapred.Task task,
                         WrappedJvmID jvmID)
Register a JVM with the listener. This should be called as soon as a JVM ID is assigned to a task attempt, before it has been launched.

Parameters:
task - the task itself for this JVM.
jvmID - The ID of the JVM .

registerLaunchedTask

void registerLaunchedTask(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID,
                          WrappedJvmID jvmID)
Register task attempt. This should be called when the JVM has been launched.

Parameters:
attemptID - the id of the attempt for this JVM.
jvmID - the ID of the JVM.

unregister

void unregister(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID,
                WrappedJvmID jvmID)
Unregister the JVM and the attempt associated with it. This should be called when the attempt/JVM has finished executing and is being cleaned up.

Parameters:
attemptID - the ID of the attempt.
jvmID - the ID of the JVM for that attempt.


Copyright © 2012 Apache Software Foundation. All Rights Reserved.