org.apache.nutch.mapReduce
Interface InterTrackerProtocol

All Known Implementing Classes:
JobTracker

public interface InterTrackerProtocol

Protocol that a TaskTracker and the central JobTracker use to communicate. The JobTracker is the Server, which implements this protocol.


Field Summary
static int TRACKERS_OK
           
static int UNKNOWN_TASKTRACKER
           
 
Method Summary
 IntWritable emitHeartbeat(TaskTrackerStatus status, BooleanWritable initialContact)
          Called regularly by the task tracker to update the status of its tasks within the job tracker.
 String getFilesystemName()
          The task tracker calls this once, to discern where it can find files referred to by the JobTracker
 MapOutputLocation[] locateMapOutputs(String taskId, String[] mapTasksNeeded)
          Called by a reduce task to find which map tasks are completed.
 String pollForClosedTask(String trackerName)
          Called to find which tasks that have been run by this tracker are now closed, i.e., their job is complete.
 Task pollForNewTask(String trackerName)
          Called to get new tasks from from the job tracker for this tracker.
 

Field Detail

TRACKERS_OK

public static final int TRACKERS_OK
See Also:
Constant Field Values

UNKNOWN_TASKTRACKER

public static final int UNKNOWN_TASKTRACKER
See Also:
Constant Field Values
Method Detail

emitHeartbeat

public IntWritable emitHeartbeat(TaskTrackerStatus status,
                                 BooleanWritable initialContact)
Called regularly by the task tracker to update the status of its tasks within the job tracker. JobTracker responds with a code that tells the TaskTracker whether all is well. TaskTracker must also indicate whether this is the first interaction (since state refresh)


pollForNewTask

public Task pollForNewTask(String trackerName)
Called to get new tasks from from the job tracker for this tracker.


pollForClosedTask

public String pollForClosedTask(String trackerName)
Called to find which tasks that have been run by this tracker are now closed, i.e., their job is complete. This is used to, e.g., notify a map task that its output is no longer needed and may be removed.


locateMapOutputs

public MapOutputLocation[] locateMapOutputs(String taskId,
                                            String[] mapTasksNeeded)
Called by a reduce task to find which map tasks are completed.

Parameters:
taskId - the reduce task id
mapTasksNeeded - an array of UTF8 naming map task ids whose output is needed.
Returns:
an array of MapOutputLocation

getFilesystemName

public String getFilesystemName()
                         throws IOException
The task tracker calls this once, to discern where it can find files referred to by the JobTracker

Throws:
IOException


Copyright © 2006 The Apache Software Foundation