@InterfaceAudience.Private @InterfaceStability.Unstable public class JobHistoryParser extends Object implements HistoryEventHandler
Modifier and Type | Class and Description |
---|---|
static class |
JobHistoryParser.AMInfo
Stores AM information
|
static class |
JobHistoryParser.JobInfo
The class where job information is aggregated into after parsing
|
static class |
JobHistoryParser.TaskAttemptInfo
Task Attempt Information is aggregated in this class after parsing
|
static class |
JobHistoryParser.TaskInfo
TaskInformation is aggregated in this class after parsing
|
Constructor and Description |
---|
JobHistoryParser(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path historyFile)
Create the job history parser for the given history file using the
given file system
|
JobHistoryParser(org.apache.hadoop.fs.FileSystem fs,
String file)
Create a job history parser for the given history file using the
given file system
|
JobHistoryParser(org.apache.hadoop.fs.FSDataInputStream in)
Create the history parser based on the input stream
|
Modifier and Type | Method and Description |
---|---|
IOException |
getParseException()
Get the parse exception, if any.
|
void |
handleEvent(HistoryEvent event) |
JobHistoryParser.JobInfo |
parse()
Parse the entire history file and populate the JobInfo object
The first invocation will populate the object, subsequent calls
will return the already parsed object.
|
JobHistoryParser.JobInfo |
parse(EventReader reader)
Only used for unit tests.
|
void |
parse(EventReader reader,
HistoryEventHandler handler)
Only used for unit tests.
|
void |
parse(HistoryEventHandler handler) |
public JobHistoryParser(org.apache.hadoop.fs.FileSystem fs, String file) throws IOException
fs
- file
- IOException
public JobHistoryParser(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path historyFile) throws IOException
fs
- historyFile
- IOException
public JobHistoryParser(org.apache.hadoop.fs.FSDataInputStream in)
in
- public void parse(HistoryEventHandler handler) throws IOException
IOException
@InterfaceAudience.Private public void parse(EventReader reader, HistoryEventHandler handler) throws IOException
IOException
public JobHistoryParser.JobInfo parse() throws IOException
getParseException()
can be used to fetch the exception, if any.IOException
getParseException()
@InterfaceAudience.Private public JobHistoryParser.JobInfo parse(EventReader reader) throws IOException
IOException
public IOException getParseException()
parse()
public void handleEvent(HistoryEvent event)
handleEvent
in interface HistoryEventHandler
Copyright © 2017 Apache Software Foundation. All Rights Reserved.