|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapred.TaskTracker
public class TaskTracker
TaskTracker is a process that starts and tracks MR Tasks in a networked environment. It contacts the JobTracker for Task assignments and reporting results.
Nested Class Summary | |
---|---|
static class |
TaskTracker.Child
The main() for child processes. |
static class |
TaskTracker.MapOutputServlet
This class is used in TaskTracker's Jetty to serve the map outputs to other nodes. |
class |
TaskTracker.TaskTrackerMetrics
|
Field Summary | |
---|---|
static int |
CLUSTER_INCREMENT
|
static long |
COUNTER_UPDATE_INTERVAL
|
static int |
FILE_NOT_FOUND
|
static int |
HEARTBEAT_INTERVAL_MIN
|
static org.apache.commons.logging.Log |
LOG
|
static String |
MAP_OUTPUT_LENGTH
The custom http header used for the map output length. |
static float |
MAX_INMEM_FILESIZE_FRACTION
Constant denoting the max size (in terms of the fraction of the total size of the filesys) of a map output file that we will try to keep in mem. |
static float |
MAX_INMEM_FILESYS_USE
Constant denoting when a merge of in memory files will be triggered |
static String |
RAW_MAP_OUTPUT_LENGTH
The custom http header used for the "raw" map output length. |
static int |
SUCCESS
|
static String |
TEMP_DIR_NAME
Temporary directory name |
static long |
versionID
Changed the version to 2, since we have a new method getMapOutputs Changed version to 3 to have progress() return a boolean Changed the version to 4, since we have replaced TaskUmbilicalProtocol.progress(String, float, String, org.apache.hadoop.mapred.TaskStatus.Phase, Counters) with statusUpdate(String, TaskStatus) Version 5 changed counters representation for HADOOP-2248 Version 6 changes the TaskStatus representation for HADOOP-2208 Version 7 changes the done api (via HADOOP-3140). |
static String |
WORKDIR
|
Constructor Summary | |
---|---|
TaskTracker(JobConf conf)
Start with the local machine name, and the default JobTracker |
Method Summary | |
---|---|
void |
cleanupStorage()
Removes all contents of temporary storage. |
void |
close()
Close down the TaskTracker and all its components. |
void |
done(String taskid,
boolean shouldPromote)
Deprecated. |
void |
done(TaskAttemptID taskid,
boolean shouldPromote)
The task is done. |
void |
fsError(String taskid,
String msg)
Deprecated. |
void |
fsError(TaskAttemptID taskId,
String message)
A child task had a local filesystem error. |
org.apache.hadoop.mapred.InterTrackerProtocol |
getJobClient()
The connection to the JobTracker, used by the TaskRunner for locating remote files. |
TaskCompletionEvent[] |
getMapCompletionEvents(JobID jobId,
int fromEventId,
int maxLocs)
Called by a reduce task to get the map output locations for finished maps. |
TaskCompletionEvent[] |
getMapCompletionEvents(String jobid,
int fromid,
int maxlocs)
Deprecated. |
long |
getProtocolVersion(String protocol,
long clientVersion)
Return protocol version corresponding to protocol interface. |
org.apache.hadoop.mapred.Task |
getTask(String id)
Deprecated. |
org.apache.hadoop.mapred.Task |
getTask(TaskAttemptID taskid)
Called upon startup by the child process, to fetch Task data. |
TaskTracker.TaskTrackerMetrics |
getTaskTrackerMetrics()
|
InetSocketAddress |
getTaskTrackerReportAddress()
Return the port at which the tasktracker bound to |
boolean |
isIdle()
Is this task tracker idle? |
static void |
main(String[] argv)
Start the TaskTracker, point toward the indicated JobTracker |
void |
mapOutputLost(String taskid,
String msg)
Deprecated. |
void |
mapOutputLost(TaskAttemptID taskid,
String errorMsg)
A completed map task's output has been lost. |
boolean |
ping(String taskid)
Deprecated. |
boolean |
ping(TaskAttemptID taskid)
Child checking to see if we're alive. |
void |
reportDiagnosticInfo(String taskid,
String info)
Deprecated. |
void |
reportDiagnosticInfo(TaskAttemptID taskid,
String info)
Called when the task dies before completion, and we want to report back diagnostic info |
void |
run()
The server retry loop. |
void |
shuffleError(String taskid,
String msg)
Deprecated. |
void |
shuffleError(TaskAttemptID taskId,
String message)
A reduce-task failed to shuffle the map-outputs. |
void |
shutdown()
|
boolean |
statusUpdate(String taskid,
org.apache.hadoop.mapred.TaskStatus status)
Deprecated. |
boolean |
statusUpdate(TaskAttemptID taskid,
org.apache.hadoop.mapred.TaskStatus taskStatus)
Called periodically to report Task progress, from 0.0 to 1.0. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log LOG
public static final int HEARTBEAT_INTERVAL_MIN
public static final int CLUSTER_INCREMENT
public static final long COUNTER_UPDATE_INTERVAL
public static final float MAX_INMEM_FILESYS_USE
public static final float MAX_INMEM_FILESIZE_FRACTION
public static final int SUCCESS
public static final int FILE_NOT_FOUND
public static final String MAP_OUTPUT_LENGTH
public static final String RAW_MAP_OUTPUT_LENGTH
public static final String TEMP_DIR_NAME
public static final String WORKDIR
public static final long versionID
Constructor Detail |
---|
public TaskTracker(JobConf conf) throws IOException
IOException
Method Detail |
---|
public TaskTracker.TaskTrackerMetrics getTaskTrackerMetrics()
public long getProtocolVersion(String protocol, long clientVersion) throws IOException
VersionedProtocol
protocol
- The classname of the protocol interfaceclientVersion
- The version of the protocol that the client speaks
IOException
public void cleanupStorage() throws IOException
IOException
public void shutdown() throws IOException
IOException
public void close() throws IOException
IOException
public org.apache.hadoop.mapred.InterTrackerProtocol getJobClient()
public InetSocketAddress getTaskTrackerReportAddress()
public void run()
run
in interface Runnable
@Deprecated public org.apache.hadoop.mapred.Task getTask(String id) throws IOException
IOException
public org.apache.hadoop.mapred.Task getTask(TaskAttemptID taskid) throws IOException
IOException
@Deprecated public boolean statusUpdate(String taskid, org.apache.hadoop.mapred.TaskStatus status) throws IOException
IOException
public boolean statusUpdate(TaskAttemptID taskid, org.apache.hadoop.mapred.TaskStatus taskStatus) throws IOException
taskid
- task-id of the childtaskStatus
- status of the child
IOException
@Deprecated public void reportDiagnosticInfo(String taskid, String info) throws IOException
IOException
public void reportDiagnosticInfo(TaskAttemptID taskid, String info) throws IOException
taskid
- the id of the task involvedinfo
- the text to report
IOException
@Deprecated public boolean ping(String taskid) throws IOException
IOException
public boolean ping(TaskAttemptID taskid) throws IOException
IOException
@Deprecated public void done(String taskid, boolean shouldPromote) throws IOException
IOException
public void done(TaskAttemptID taskid, boolean shouldPromote) throws IOException
taskid
- task's idshouldPromote
- whether to promote the task's output or not
IOException
@Deprecated public void shuffleError(String taskid, String msg) throws IOException
IOException
public void shuffleError(TaskAttemptID taskId, String message) throws IOException
IOException
@Deprecated public void fsError(String taskid, String msg) throws IOException
IOException
public void fsError(TaskAttemptID taskId, String message) throws IOException
IOException
@Deprecated public TaskCompletionEvent[] getMapCompletionEvents(String jobid, int fromid, int maxlocs) throws IOException
IOException
public TaskCompletionEvent[] getMapCompletionEvents(JobID jobId, int fromEventId, int maxLocs) throws IOException
fromEventId
- the index starting from which the locations should be
fetchedmaxLocs
- the max number of locations to fetch
IOException
@Deprecated public void mapOutputLost(String taskid, String msg) throws IOException
IOException
public void mapOutputLost(TaskAttemptID taskid, String errorMsg) throws IOException
IOException
public boolean isIdle()
public static void main(String[] argv) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |