Package net.sf.basedb.opengrid.engine
Class SlurmEngine.SlurmJobStatus
java.lang.Object
net.sf.basedb.opengrid.JobStatus
net.sf.basedb.opengrid.engine.SlurmEngine.SlurmJobStatus
- Enclosing class:
- SlurmEngine
Job status information for Slurm jobs. We need the subclass to
be able to parse and update the status via protected setter methods.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final DateFormatter
Formatter for displaying current date without time.static final DateFormatter
Formatter for displaying current date and time.The output from 'squeue' and 'sacct' have *several* ways to indicate no information is available.private boolean
static final DateFormatter
Slurm always (I hope) return dates in "yyyy-MM-ddTHH:mm:ss" format.Fields inherited from class net.sf.basedb.opengrid.JobStatus
QACCT_DATE, QSTAT_DATE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Was this job paused by an admin or a regular user?(package private) void
readFromSqueueAndSacct
(String text, int timeAdjustment, SlurmEngine.PendingJobsCmd pendingJobs) Parse the output from 'squeue -o %all -j{id}'.(package private) void
readFromStatusFile
(String text, int timeAdjustment) Parse information from the STATUS_FILE.void
setPausedByAdmin
(boolean pausedByAdmin) Set a flag that indicates if a job was paused by an admin or not.Methods inherited from class net.sf.basedb.opengrid.JobStatus
getEndDate, getEndTime, getExitCode, getJobIdentifier, getMessage, getName, getNodeName, getProgress, getStartDate, getStartTime, getStatus, getSubmissionDate, getSubmissionTime, isAlive, setEndTime, setExitCode, setMessage, setName, setNodeName, setProgress, setStartTime, setStatus, setSubmissionTime, toString
-
Field Details
-
nullVariants
The output from 'squeue' and 'sacct' have *several* ways to indicate no information is available. We list all of them (that we know about) and convert the actual value to 'null' when parsing. -
SLURM_DATE
Slurm always (I hope) return dates in "yyyy-MM-ddTHH:mm:ss" format. Example: 2014-03-21T08:59:09 -
DATE_FORMAT
Formatter for displaying current date without time.- Since:
- 1.15
-
DATETIME_FORMAT
Formatter for displaying current date and time.- Since:
- 1.15
-
pausedByAdmin
private boolean pausedByAdmin
-
-
Constructor Details
-
SlurmJobStatus
-
-
Method Details
-
setPausedByAdmin
public void setPausedByAdmin(boolean pausedByAdmin) Set a flag that indicates if a job was paused by an admin or not. Jobs that are paused by an admin can't be resumed by regular user.- Since:
- 1.15
-
isPausedByAdmin
public boolean isPausedByAdmin()Was this job paused by an admin or a regular user?- Since:
- 1.15
-
readFromSqueueAndSacct
void readFromSqueueAndSacct(String text, int timeAdjustment, SlurmEngine.PendingJobsCmd pendingJobs) Parse the output from 'squeue -o %all -j{id}'. -
readFromStatusFile
Parse information from the STATUS_FILE.
-