public class JobHistory extends Object
限定符和类型 | 类和说明 |
---|---|
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.
|
限定符和类型 | 字段和说明 |
---|---|
static Pattern |
CONF_FILENAME_REGEX |
protected static Path |
DONE |
protected static FileSystem |
DONEDIR_FS |
static int |
JOB_NAME_TRIM_LENGTH |
static Pattern |
JOBHISTORY_FILENAME_REGEX |
static org.apache.commons.logging.Log |
LOG |
构造器和说明 |
---|
JobHistory() |
限定符和类型 | 方法和说明 |
---|---|
static String |
getHistoryFilePath(JobID jobId)
Given the job id, return the history file path from the cache
|
static String |
getTaskLogsUrl(JobHistory.TaskAttempt attempt)
Return the TaskLogsUrl of a particular TaskAttempt
|
static void |
init(JobTracker jobTracker,
JobConf conf,
String hostname,
long jobTrackerStartTime)
Initialize JobHistory files.
|
static void |
parseHistoryFromFS(String path,
JobHistory.Listener l,
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 FileSystem DONEDIR_FS
protected static Path DONE
public static final Pattern JOBHISTORY_FILENAME_REGEX
public static final Pattern CONF_FILENAME_REGEX
public static String getHistoryFilePath(JobID jobId)
public static void init(JobTracker jobTracker, JobConf conf, String hostname, long jobTrackerStartTime) throws IOException
conf
- Jobconf of the job tracker.hostname
- jobtracker's hostnamejobTrackerStartTime
- jobtracker's start timeIOException
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 presentIOException
public static String getTaskLogsUrl(JobHistory.TaskAttempt attempt)
attempt
- Copyright © 2009 The Apache Software Foundation