Modifier and Type | Field and Description |
---|---|
protected int |
counter
The counter to track the number of invocation records.
|
static String |
MACHINE_INFO_PREFIX
The prefix for machine information keys
|
protected List<Map<String,String>> |
mInvocationList
List of Invocation maps.
|
protected Map<String,String> |
mInvocationMap
The Map of key value pairs that are to be logged via Netlogger.
|
protected LogManager |
mLogger
The handle to the logger.
|
protected String |
mMainJob
The main job whose record is being parsed.
|
protected String |
mSite
The logical site where the job was run.
|
Constructor and Description |
---|
NetloggerCallback()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cbInputFile(String filename,
StatInfo info)
Callback function for when stat information for an input file is
encountered.
|
void |
cbInvocationEnd()
Callback signalling that an invocation record has been parsed.
|
void |
cbInvocationStart(String job,
String resource)
Callback for the starting of an invocation record.
|
void |
cbMachine(Machine machine)
Callback to pass the machine information on which the job is
executed.
|
void |
cbMetadata(Map metadata)
Callback for the metadata retrieved from the kickstart record.
|
void |
cbOutputFile(String filename,
StatInfo info)
Callback function for when stat information for an output file is
encountered.
|
void |
cbStdERR(List jobs,
String data)
Callback function for the data section of stderr.
|
void |
cbStdIN(List jobs,
String data)
Callback function for the data section of stdin.
|
void |
cbStdOut(List jobs,
String data)
Callback function for the data section of stdout.
|
void |
done()
Callback signalling that we are done with the parsing of the files.
|
Object |
getConstructedObject()
Returns a List of Map objects where each map captures information in one
invocation record.
|
private String |
getListValueFromMetadata(Map m,
String key)
Returns the first value from the List values for a key
|
void |
initialize(String directory,
boolean useStatInfo)
Initializes the callback.
|
public static final String MACHINE_INFO_PREFIX
protected String mSite
protected String mMainJob
protected LogManager mLogger
protected Map<String,String> mInvocationMap
protected int counter
public void initialize(String directory, boolean useStatInfo)
initialize
in interface Callback
directory
- the directory where all the files reside.useStatInfo
- boolean indicating whether to use stat info or not.public void cbInvocationStart(String job, String resource)
cbInvocationStart
in interface Callback
job
- the job/file being parsed.resource
- the site id where the job was executed.public void cbStdIN(List jobs, String data)
Callback
public void cbStdOut(List jobs, String data)
Callback
public void cbStdERR(List jobs, String data)
Callback
public void cbInputFile(String filename, StatInfo info)
cbInputFile
in interface Callback
filename
- the name of the file.info
- the StatInfo
about the file.public void cbOutputFile(String filename, StatInfo info)
cbOutputFile
in interface Callback
filename
- the name of the file.info
- the StatInfo
about the file.public void cbInvocationEnd()
cbInvocationEnd
in interface Callback
public Object getConstructedObject()
getConstructedObject
in interface Callback
public void done()
public void cbMetadata(Map metadata)
cbMetadata
in interface Callback
metadata
- public void cbMachine(Machine machine)
Copyright © 2011 The University of Southern California. All Rights Reserved.