public class JobHistory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
JobHistory.HistoryCleaner
Delete history files older than one month (or a configurable age).
|
static class |
JobHistory.JobInfo
Helper class for logging or reading back events related to job start, finish or failure.
|
static class |
JobHistory.Keys
Job history files contain key="value" pairs, where keys belong to this enum.
|
static interface |
JobHistory.Listener
Callback interface for reading back log events from JobHistory.
|
static class |
JobHistory.MapAttempt
Helper class for logging or reading back events related to start, finish or failure of
a Map Attempt on a node.
|
static class |
JobHistory.RecordTypes
Record types are identifiers for each line of log in history files.
|
static class |
JobHistory.ReduceAttempt
Helper class for logging or reading back events related to start, finish or failure of
a Map Attempt on a node.
|
static class |
JobHistory.Task
Helper class for logging or reading back events related to Task's start, finish or failure.
|
static class |
JobHistory.TaskAttempt
Base class for Map and Reduce TaskAttempts.
|
static class |
JobHistory.Values
This enum contains some of the values commonly used by history log events.
|
Modifier and Type | Field and Description |
---|---|
protected static org.apache.hadoop.fs.Path |
DONE |
protected static org.apache.hadoop.fs.FileSystem |
DONEDIR_FS |
static int |
JOB_NAME_TRIM_LENGTH |
static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
JobHistory() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getHistoryFilePath(JobID jobId)
Given the job id, return the history file path from the cache
|
static java.lang.String |
getTaskLogsUrl(JobHistory.TaskAttempt attempt)
Return the TaskLogsUrl of a particular TaskAttempt
|
static void |
init(JobTracker jobTracker,
JobConf conf,
java.lang.String hostname,
long jobTrackerStartTime)
Initialize JobHistory files.
|
static void |
parseHistoryFromFS(java.lang.String path,
JobHistory.Listener l,
org.apache.hadoop.fs.FileSystem fs)
Parses history file and invokes Listener.handle() for
each line of history.
|
public static final org.apache.commons.logging.Log LOG
public static final int JOB_NAME_TRIM_LENGTH
protected static org.apache.hadoop.fs.FileSystem DONEDIR_FS
protected static org.apache.hadoop.fs.Path DONE
public static java.lang.String getHistoryFilePath(JobID jobId)
public static void init(JobTracker jobTracker, JobConf conf, java.lang.String hostname, long jobTrackerStartTime) throws java.io.IOException
conf
- Jobconf of the job tracker.hostname
- jobtracker's hostnamejobTrackerStartTime
- jobtracker's start timejava.io.IOException
public static void parseHistoryFromFS(java.lang.String path, JobHistory.Listener l, org.apache.hadoop.fs.FileSystem fs) throws java.io.IOException
path
- path to history filel
- Listener for history eventsfs
- FileSystem where history file is presentjava.io.IOException
public static java.lang.String getTaskLogsUrl(JobHistory.TaskAttempt attempt)
attempt
- Copyright © 2009 The Apache Software Foundation