|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.contrib.failmon.LogParser
public abstract class LogParser
This class represents objects that provide log parsing functionality. Typically, such objects read log files line by line and for each log entry they identify, they create a corresponding EventRecord. In this way, disparate log files can be merged using the uniform format of EventRecords and can, thus, be processed in a uniform way.
Constructor Summary | |
---|---|
LogParser(String fname)
Create a parser that will read from the specified log file. |
Method Summary | |
---|---|
void |
checkForRotation()
Check whether the log file has been rotated. |
EventRecord |
getNext()
Continue parsing the log file until a valid log entry is identified. |
BufferedReader |
getReader()
Return the BufferedReader, that reads the log file |
EventRecord[] |
monitor()
Get an array of all EventRecords that can be extracted for the represented hardware component. |
void |
monitor(LocalStore ls)
Insert all EventRecords that can be extracted for the represented hardware component into a LocalStore. |
protected abstract Calendar |
parseDate(String strDate,
String strTime)
Parse a date found in Hadoop log file. |
abstract EventRecord |
parseLine(String line)
Parses one line of the log. |
protected void |
setNetworkProperties()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.contrib.failmon.Monitored |
---|
getInfo |
Constructor Detail |
---|
public LogParser(String fname)
fname
- the filename of the log file to be readMethod Detail |
---|
protected void setNetworkProperties()
public void monitor(LocalStore ls)
monitor
in interface Monitored
ls
- the LocalStore into which the EventRecords
are to be stored.public EventRecord[] monitor()
monitor
in interface Monitored
public EventRecord getNext()
public BufferedReader getReader()
public void checkForRotation()
public abstract EventRecord parseLine(String line) throws IOException
line
- the log line to be parsed
IOException
protected abstract Calendar parseDate(String strDate, String strTime)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |