|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapred.JobHistory
public class JobHistory
Provides methods for writing to and reading from job history. Job History works in an append mode, JobHistory and its inner classes provide methods to log job events. JobHistory is split into multiple files, format of each file is plain text where each line is of the format [type (key=value)*], where type identifies the type of the record. Type maps to UID of one of the inner classes of this class. Job history is maintained in a master index which contains star/stop times of all jobs with a few other job level properties. Apart from this each job's history is maintained in a seperate history file. name of job history files follows the format jobtrackerId_jobid For parsing the job history it supports a listener based interface where each line is parsed and passed to listener. The listener can create an object model of history or look for specific events and discard rest of the history.
Nested Class Summary | |
---|---|
static class |
JobHistory.HistoryCleaner
Delete history files older than one month. |
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. |
Field Summary | |
---|---|
static String |
JOBTRACKER_START_TIME
|
Constructor Summary | |
---|---|
JobHistory()
|
Method Summary | |
---|---|
static boolean |
init(JobConf conf,
String hostname)
Initialize JobHistory files. |
static boolean |
isDisableHistory()
Returns history disable status. |
static void |
parseHistoryFromFS(String path,
JobHistory.Listener l,
FileSystem fs)
Parses history file and invokes Listener.handle() for each line of history. |
static void |
setDisableHistory(boolean disableHistory)
Enable/disable history logging. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String JOBTRACKER_START_TIME
Constructor Detail |
---|
public JobHistory()
Method Detail |
---|
public static boolean init(JobConf conf, String hostname)
conf
- Jobconf of the job tracker.hostname
- jobtracker's hostname
public static void parseHistoryFromFS(String path, JobHistory.Listener l, FileSystem fs) throws IOException
path
- path to history filel
- Listener for history eventsfs
- FileSystem where history file is present
IOException
public static boolean isDisableHistory()
public static void setDisableHistory(boolean disableHistory)
disableHistory
- true if history should be disabled, false otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |