public class PersistentState
extends java.lang.Object
Constructor and Description |
---|
PersistentState() |
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.contrib.failmon.ParseState |
getState(java.lang.String fname)
Read and return the state of parsing for a particular log file.
|
static void |
readState(java.lang.String fname)
Read the state of parsing for all open log files from a property
file.
|
static void |
setState(org.apache.hadoop.contrib.failmon.ParseState state)
Set the state of parsing for a particular log file.
|
static void |
updateState(java.lang.String filename,
java.lang.String firstLine,
long offset)
Upadate the state of parsing for a particular log file.
|
static void |
writeState(java.lang.String fname)
Write the state of parsing for all open log files to a property
file on disk.
|
public static void readState(java.lang.String fname)
fname
- the filename of the property file to be readpublic static org.apache.hadoop.contrib.failmon.ParseState getState(java.lang.String fname)
fname
- the log file for which to read the statepublic static void setState(org.apache.hadoop.contrib.failmon.ParseState state)
state
- the ParseState to setpublic static void updateState(java.lang.String filename, java.lang.String firstLine, long offset)
filename
- the log file for which to update the statefirstLine
- the first line of the log file currentlyoffset
- the byte offset of the last character parsedpublic static void writeState(java.lang.String fname)
fname
- the filename of the property file to write toCopyright © 2009 The Apache Software Foundation