Package net.sf.basedb.opengrid.engine
Class SlurmEngine.SacctCmd
- Enclosing class:
- SlurmEngine
public static class SlurmEngine.SacctCmd extends CmdResult<JobStatus>
Implements the 'sacct' command for getting information about a completed job.
The -P option generates output separated by '|' and we can specify the columns
that we need.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.sf.basedb.opengrid.CmdResult
CmdResult.DateResult, CmdResult.StdioResult
-
Field Summary
Fields Modifier and Type Field Description private JobIdentifier
jobId
static String
SACCT_COLS
Data columns we want to return from 'sacct'.private int
timeAdjustment
-
Constructor Summary
Constructors Constructor Description SacctCmd(JobIdentifier jobId, int timeAdjustment)
-
Method Summary
Modifier and Type Method Description protected void
parseResult()
This method is called after the command has been executed and the exit code, stdout and stderr has been updated.Methods inherited from class net.sf.basedb.opengrid.CmdResult
asJSONObject, getCmd, getException, getExitStatus, getHardTimeout, getResult, getStderr, getStdout, setException, setExitStatus, setResult, setStderr, setStdout, throwExceptionIfNonZeroExitStatus, toString
-
Field Details
-
SACCT_COLS
Data columns we want to return from 'sacct'. Note that order is important in some cases. For example we need 'ExitCode' before 'State' since 'State' will override in some cases.- See Also:
- Constant Field Values
-
jobId
-
timeAdjustment
private final int timeAdjustment
-
-
Constructor Details
-
SacctCmd
-
-
Method Details
-
parseResult
protected void parseResult()Description copied from class:CmdResult
This method is called after the command has been executed and the exit code, stdout and stderr has been updated. Subclasses can override this method to take actions. The default implementation does nothing.- Overrides:
parseResult
in classCmdResult<JobStatus>
-