public class JobHistory extends Object
Modifier and Type | Class and Description |
---|---|
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.
|
Modifier and Type | Field and Description |
---|---|
static int |
JOB_NAME_TRIM_LENGTH |
static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
JobHistory() |
Modifier and Type | Method and Description |
---|---|
static String |
getTaskLogsUrl(JobHistory.TaskAttempt attempt)
Return the TaskLogsUrl of a particular TaskAttempt
|
static boolean |
init(JobConf conf,
String hostname,
long jobTrackerStartTime)
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.
|
public static final org.apache.commons.logging.Log LOG
public static final int JOB_NAME_TRIM_LENGTH
public static boolean init(JobConf conf, String hostname, long jobTrackerStartTime)
conf
- Jobconf of the job tracker.hostname
- jobtracker's hostnamejobTrackerStartTime
- jobtracker's start timepublic 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 presentIOException
public static boolean isDisableHistory()
public static void setDisableHistory(boolean disableHistory)
disableHistory
- true if history should be disabled, false otherwise.public static String getTaskLogsUrl(JobHistory.TaskAttempt attempt)
attempt
- Copyright © 2010 The Apache Software Foundation