public class TailStatd extends SpaceUsageCallback
Modifier and Type | Field and Description |
---|---|
static String |
GRIDSTART_MAINJOB_STATE
The state in the jobstate that is taken to designate the GRIDSTART_MAINJOB
time.
|
static String |
GRIDSTART_POSTJOB_STATE
The state in the jobstate that is taken to designate the GRIDSTART_POSTJOB
time.
|
static String |
GRIDSTART_PREJOB_STATE
The state in the jobstate that is taken to designate the GRIDSTART_PREJOB
time.
|
static String |
JOBSTATE_LOG
The name of the tailstatd file.
|
private String |
mDirectory
The directory where all the files reside.
|
private Map |
mJobSpaceStore
A Map store that stores JobSpace objects indexed by the name of the jobs.
|
private LogManager |
mLogger
The handle to the logging object
|
MAINJOB_MARKER, mJobInSize, mJobOutSize, mJobSpace, mMainJob, mSite, mSpaceStore, mUseStatInfo, POSTJOB_MARKER, PREJOB_MARKER
Constructor and Description |
---|
TailStatd()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cbInvocationStart(String job,
String resource)
Callback for the starting of an invocation record.
|
private int |
getEventType(String state)
Returns the event type matching a particular job type
|
void |
initialize(String directory,
boolean useStatInfo)
Initializes the callback.
|
protected Space |
parseContent(String header,
String content)
Parses the content and stores it in a SpaceUsage object.
|
protected boolean |
validState(String state)
Returns a boolean indicating whether the state is valid or not.
|
cbInputFile, cbInvocationEnd, cbMachine, cbMetadata, cbOutputFile, cbStdERR, cbStdIN, cbStdOut, cleanupJob, done, getConstructedObject, getEventTypeForHeader, validHeader
public static final String JOBSTATE_LOG
public static final String GRIDSTART_PREJOB_STATE
public static final String GRIDSTART_MAINJOB_STATE
public static final String GRIDSTART_POSTJOB_STATE
private String mDirectory
private Map mJobSpaceStore
private LogManager mLogger
public void initialize(String directory, boolean useStatInfo)
initialize
in interface Callback
initialize
in class SpaceUsageCallback
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
cbInvocationStart
in class SpaceUsageCallback
job
- the job/file being parsed.resource
- the site id where the job was executed.protected Space parseContent(String header, String content)
parseContent
in class SpaceUsageCallback
header
- the header from which the content was collected.content
- the Content.protected boolean validState(String state)
state
- the stateprivate int getEventType(String state)
state
- the state of the jobCopyright © 2011 The University of Southern California. All Rights Reserved.