public abstract class LogParser extends java.lang.Object implements Monitored
Constructor and Description |
---|
LogParser(java.lang.String fname)
Create a parser that will read from the specified log file.
|
Modifier and Type | Method and Description |
---|---|
void |
checkForRotation()
Check whether the log file has been rotated.
|
EventRecord |
getNext()
Continue parsing the log file until a valid log entry is identified.
|
java.io.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 java.util.Calendar |
parseDate(java.lang.String strDate,
java.lang.String strTime)
Parse a date found in Hadoop log file.
|
abstract EventRecord |
parseLine(java.lang.String line)
Parses one line of the log.
|
protected void |
setNetworkProperties() |
public LogParser(java.lang.String fname)
fname
- the filename of the log file to be readprotected void setNetworkProperties()
public void monitor(LocalStore ls)
public EventRecord[] monitor()
public EventRecord getNext()
public java.io.BufferedReader getReader()
public void checkForRotation()
public abstract EventRecord parseLine(java.lang.String line) throws java.io.IOException
line
- the log line to be parsedjava.io.IOException
protected abstract java.util.Calendar parseDate(java.lang.String strDate, java.lang.String strTime)
Copyright © 2009 The Apache Software Foundation