public class PersistentState extends Object
Constructor and Description |
---|
PersistentState() |
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.contrib.failmon.ParseState |
getState(String fname)
Read and return the state of parsing for a particular log file.
|
static void |
readState(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(String filename,
String firstLine,
long offset)
Upadate the state of parsing for a particular log file.
|
static void |
writeState(String fname)
Write the state of parsing for all open log files to a property
file on disk.
|
public static void readState(String fname)
fname
- the filename of the property file to be readpublic static org.apache.hadoop.contrib.failmon.ParseState getState(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(String filename, 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(String fname)
fname
- the filename of the property file to write toCopyright © 2010 The Apache Software Foundation