|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.mapred.JobHistory.Task
public static class JobHistory.Task
Helper class for logging or reading back events related to Task's start, finish or failure. All events logged by this class are logged in a separate file per job in job tracker history. These events map to TIPs in jobtracker.
| Constructor Summary | |
|---|---|
JobHistory.Task()
|
|
| Method Summary | |
|---|---|
String |
get(JobHistory.Keys k)
Get 'String' value for given key. |
int |
getInt(JobHistory.Keys k)
Convert value from history to int and return. |
long |
getLong(JobHistory.Keys k)
Convert value from history to int and return. |
Map<String,JobHistory.TaskAttempt> |
getTaskAttempts()
Returns all task attempts for this task. |
Map<JobHistory.Keys,String> |
getValues()
Returns Map containing all key-values. |
void |
handle(Map<JobHistory.Keys,String> values)
Reads values back from the history, input is same Map as passed to Listener by parseHistory(). |
static void |
logFailed(TaskID taskId,
String taskType,
long time,
String error)
Log job failed event. |
static void |
logFailed(TaskID taskId,
String taskType,
long time,
String error,
TaskAttemptID failedDueToAttempt)
|
static void |
logFinished(TaskID taskId,
String taskType,
long finishTime,
Counters counters)
Log finish time of task. |
static void |
logStarted(TaskID taskId,
String taskType,
long startTime,
String splitLocations)
Log start time of task (TIP). |
static void |
logUpdates(TaskID taskId,
long finishTime)
Update the finish time of task. |
void |
set(JobHistory.Keys k,
String s)
Set value for the key. |
void |
set(Map<JobHistory.Keys,String> m)
Adds all values in the Map argument to its own values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JobHistory.Task()
| Method Detail |
|---|
public static void logStarted(TaskID taskId,
String taskType,
long startTime,
String splitLocations)
taskId - task idtaskType - MAP or REDUCEstartTime - startTime of tip.
public static void logFinished(TaskID taskId,
String taskType,
long finishTime,
Counters counters)
taskId - task idtaskType - MAP or REDUCEfinishTime - finish timeof task in ms
public static void logUpdates(TaskID taskId,
long finishTime)
taskId - task idfinishTime - finish time of task in ms
public static void logFailed(TaskID taskId,
String taskType,
long time,
String error)
taskId - task idtaskType - MAP or REDUCE.time - timestamp when job failed detected.error - error message for failure.
public static void logFailed(TaskID taskId,
String taskType,
long time,
String error,
TaskAttemptID failedDueToAttempt)
failedDueToAttempt - The attempt that caused the failure, if anypublic Map<String,JobHistory.TaskAttempt> getTaskAttempts()
public String get(JobHistory.Keys k)
k -
public int getInt(JobHistory.Keys k)
k - keypublic long getLong(JobHistory.Keys k)
k -
public void set(JobHistory.Keys k,
String s)
k - s - public void set(Map<JobHistory.Keys,String> m)
m - public void handle(Map<JobHistory.Keys,String> values)
values - public Map<JobHistory.Keys,String> getValues()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||