public abstract class LogParser extends Object implements Monitored
Constructor and Description |
---|
LogParser(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.
|
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() |
public LogParser(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 BufferedReader getReader()
public void checkForRotation()
public abstract EventRecord parseLine(String line) throws IOException
line
- the log line to be parsedIOException
Copyright © 2010 The Apache Software Foundation