Class JobDescription
java.lang.Object
com.sun.grid.jsv.JobDescription
- All Implemented Interfaces:
Serializable, Cloneable
The JobDescription class represents a job to be verified by the JSV. It
contains the values of all submissions attributes applied to the job as well
as the job's environment variables' values if requested.
All properties of this class may be null. A property with a null value
indicates that the value was not set by the JSV framework, and hence was not
a submission attribute of the job being verified. Care must be taken with
the Boolean and Integer properties to prevent null pointer exceptions caused
by autoboxing. Setting a property value to null deletes the corresponding
submission attribute from the job being verified.
All properties of Collection type return copies of the Collection from their
getter methods. In order to make changes to the contents of the Collection,
the corresponding setter method must be called. It is acceptable to make
the changes to the Collection instance returned from the getter method and
then commit those changes by passing that Collection instance to the setter
method.
The JobDescription class uses the Logger named "com.sun.grid.Jsv". By
default the Logger is set not to pass log records to its parent logger
because the default Logger writes to stdout and would disrupt the JSV
protocol. By default, the Logger has no handlers installed. In order to
enable logging, add a handler, i.e. a FileHandler instance.
It is always a good idea to enabling logging, as errors in JSV protocol
handling will be logged as warnings, but will not be visible any other way.
- Since:
- 6.2u5
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe possible values for the verification property. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringString value of the context property that indicates the JSV is running on the master node.static final StringString value of the client property that indicates the JSV is running on the master node.static final StringString value of the context property that indicates the JSV is running on the master node. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JobDescriptionclone()doNotify()Get whether the job should be sent warning signals before being suspended or terminated.Get the account string.Get the advance reservation id.Get the BindingSpecifier object that represents the core binding settings for the job.Get an object representing the checkpointing options.Get the client string.String[]Get the arguments to the job.Get the job command.Get the context string.Get the job's deadline time.Get the job's display value.Get the job's environment variables.Get the job's error path.getGroup()Get the primary group id for the job's submitter.Get the hard queue list.Get the hard resource requirements.Get the list of array job identifiers on which this job's array tasks are dependent.Get the list of job identifiers on which this job is dependent.Get the job's input path.Get the job's job context map.getJobId()Get the job's idGet the job's assigned functional ticket share.Get the list of email recipients for this job.Get a MailSpecifier object that represents the occasions when email notifications should be sent for this job.Get the master queue list.getName()Get the job's name.Get the job's output path.Get the ParallelEnvironment object that represents the parallel environment settings for the job.Get the job's priority.Get the job's project See qsub -P.Get the shell path list.Get the soft queue list.Get the soft resource requirements map.Get the job's start time.Get the object that represents the array task specifier.getUser()Get the submitting user.Get the verification level.Get the JSV framework version.Get the working directory for the job See qsub -cwd -wd.Get whether the job uses resource reservation.isBinary()Get whether the job is binary.Get whether the job can be requeued during execd failure.Get whether the output and error streams should be written into the same file.onHold()Get whether the job is submitted in the hold state.voidsetAccount(String account) Set the value of the account string.voidsetAdvanceReservationId(Integer advanceReservationId) Set the value of the advance reservation id.voidSet whether the job is binary.voidsetBindingSpecifier(BindingSpecifier binding) Set the BindingSpecifier object that represents the job to core binding settings.voidsetCheckpointSpecifier(CheckpointSpecifier checkpointSpecifier) Set the CheckpointSpecifier object that defines the checkpointing settings for the job.voidsetCommandArgs(String[] commandArgs) Set the job's command arguments.voidsetDeadline(Calendar deadline) Set the deadline time.voidsetDisplay(String display) Set the display string.voidsetEnvironment(Map<String, String> environment) Set the job's environment variable.voidsetErrorPath(Map<String, String> path) Set the error path.voidsetHardQueue(List<String> queues) Set the hard queue list.voidsetHardResourceRequirements(Map<String, String> resources) Set the hard resource requirements map.voidSet whether the job should be submitted in hold state.voidsetHoldArrayJobIds(List<String> jobIds) Set the list of array job identifiers on which the job tasks depened.voidsetHoldJobIds(List<String> jobIds) Set the list of job identifiers on which the job depeneds.voidsetInputPath(Map<String, String> path) Set the input path.voidsetJobContext(Map<String, String> context) Set the job's context.voidsetJobShare(Integer jobShare) Set the job's functional ticket share See qsub -js.voidsetMailRecipients(List<String> recipients) Set the list of email recipients to be notified on job events.voidsetMailSpecifier(MailSpecifier mailSpecifier) Set the MailSpecifier object that represents when email notifications should be sent.voidsetMasterQueue(List<String> queues) Set the master queue list.voidsetMergeStreams(Boolean mergeStreams) Set whether the output and error streams should be merged.voidSet the job's name.voidSet whether the job should be sent warning signals before being suspended or terminated.voidsetOutputPath(Map<String, String> path) Set the output path.voidSet the ParallelEnvironment object that represent's the job's PE settings.voidsetPriority(Integer priority) Set the job's priority.voidsetProject(String project) Set the job's project.voidsetRerunnable(Boolean rerunnable) Set whether the job can be requeued in the event of execd failure.voidsetResourceReservation(Boolean reservation) Set whether the job should use resource reservation.voidSet whether the job should be launched by a shell.voidsetShellPath(Map<String, String> path) Set the job's shell path.voidsetSoftQueue(List<String> queues) Set the job's soft queue list See qsub -soft -q.voidsetSoftResourceRequirements(Map<String, String> resources) Set the job's soft resource requirements map.voidsetStartTime(Calendar startTime) Set the job's start time.voidsetTaskSpecifier(TaskSpecifier taskSpecifier) Set the TaskSpecifier object that defines the job's array task settings.voidsetVerification(JobDescription.Verification verification) Set the job's verification level.voidSet the working directory.useShell()Get whether the job should be launched via a shell.
-
Field Details
-
MASTER_CLIENT
String value of the client property that indicates the JSV is running on the master node.- See Also:
-
MASTER_CONTEXT
String value of the context property that indicates the JSV is running on the master node.- See Also:
-
CLIENT_CONTEXT
String value of the context property that indicates the JSV is running on the master node.- See Also:
-
-
Constructor Details
-
JobDescription
public JobDescription()
-
-
Method Details
-
getAccount
-
getAdvanceReservationId
Get the advance reservation id. Note that the return value will be null if the advance reservation id has not been set. See qsub -ar.- Returns:
- the advance reservation id
-
getCheckpointSpecifier
Get an object representing the checkpointing options. The object that is returned will be a copy of the internal object, so modifications to the returned object will have no effect on the JobDescription instance.- Returns:
- the checkpointing options See qsub -ckpt -c.
- See Also:
-
getClient
Get the client string. If the JSV is running on the master node, the value of this string will be "qmaster". If the JSV is running on the submission client node, the value of this string will be the name of the submission utility, e.g. qsub, qrsh, etc.- Returns:
- the client string
- See Also:
-
getCommandArgs
Get the arguments to the job. The array that is returned will be a copy of the internal command arguments array, so modifications to the returned value will have no effect on the JobDescription instance.- Returns:
- the job arguments
-
getCommandName
-
getContext
Get the context string. If the JSV is running on the master node, the value of this string will be "master". If the JSV is running on the submission client node, the value of this string will be "client".- Returns:
- the context string
- See Also:
-
getWorkingDirectory
Get the working directory for the job See qsub -cwd -wd.- Returns:
- the working directory
-
getDeadline
Get the job's deadline time. The object that is returned will be a copy of the internal object, so modifications to the returned object will have no effect on the JobDescription instance. See qsub -dl.- Returns:
- the deadline time
-
getDisplay
Get the job's display value. See qsub -display.- Returns:
- the display value
-
getErrorPath
-
getGroup
-
getHardQueue
-
getHardResourceRequirements
Get the hard resource requirements. The object that is returned will be a copy of the internal object, so modifications to the returned object will have no effect on the JobDescription instance. See qsub -hard -l.- Returns:
- the hard resource requirements
-
getHoldArrayJobIds
Get the list of array job identifiers on which this job's array tasks are dependent. The object that is returned will be a copy of the internal object, so modifications to the returned object will have no effect on the JobDescription instance. See qsub -hold_jid_ad.- Returns:
- the array job dependencies
-
getHoldJobIds
Get the list of job identifiers on which this job is dependent. The object that is returned will be a copy of the internal object, so modifications to the returned object will have no effect on the JobDescription instance. See qsub -hold_jid.- Returns:
- the job dependencies
-
getInputPath
-
getJobContext
-
getJobId
-
getMailRecipients
-
getMailSpecifier
Get a MailSpecifier object that represents the occasions when email notifications should be sent for this job. The object that is returned will be a copy of the internal object, so modifications to the returned object will have no effect on the JobDescription instance. See qsub -m.- Returns:
- the mail specifier
- See Also:
-
getMasterQueue
-
getName
-
getOutputPath
-
getParallelEnvironment
Get the ParallelEnvironment object that represents the parallel environment settings for the job. The object that is returned will be a copy of the internal object, so modifications to the returned object will have no effect on the JobDescription instance. See qsub -pe.- Returns:
- the pe specification
- See Also:
-
getBindingSpecifier
Get the BindingSpecifier object that represents the core binding settings for the job. The object that is returned will be a copy of the internal object, so modifications to the returned object will have no effect on the JobDescription instance. See qsub -binding.- Returns:
- the binding specification
- See Also:
-
getPriority
Get the job's priority. Note that the return value will be null if the value has not been set. See qsub -p.- Returns:
- the job priority
-
getProject
-
getShellPath
-
getSoftQueue
-
getSoftResourceRequirements
Get the soft resource requirements map. The object that is returned will be a copy of the internal object, so modifications to the returned object will have no effect on the JobDescription instance. See qsub -soft -l.- Returns:
- the soft requirements map
-
getStartTime
Get the job's start time. The object that is returned will be a copy of the internal object, so modifications to the returned object will have no effect on the JobDescription instance. See qsub -a.- Returns:
- the start time
-
getTaskSpecifier
Get the object that represents the array task specifier. The object that is returned will be a copy of the internal object, so modifications to the returned object will have no effect on the JobDescription instance. See qsub -t.- Returns:
- the array task specifier
- See Also:
-
getUser
-
getVerification
Get the verification level. See qsub -w.- Returns:
- the verification level
-
getVersion
-
useShell
Get whether the job should be launched via a shell. Note that the return value will be null if the value has not been set. See qsub -shell.- Returns:
- whether to use a shell
-
hasResourceReservation
Get whether the job uses resource reservation. Note that the return value will be null if the value has not been set. See qsub -R.- Returns:
- whether to use resource reservation
-
isRerunnable
Get whether the job can be requeued during execd failure. Note that the return value will be null if the value has not been set. See qsub -r.- Returns:
- whether the job can be requeued
-
doNotify
Get whether the job should be sent warning signals before being suspended or terminated. Note that the return value will be null if the value has not been set. See qsub -notify.- Returns:
- whether the job should get warning signals
-
mergeStreams
Get whether the output and error streams should be written into the same file. Note that the return value will be null if the value has not been set. See qsub -j.- Returns:
- whether to merge the streams
-
onHold
Get whether the job is submitted in the hold state. Note that the return value will be null if the value has not been set. See qsub -h.- Returns:
- whether the job is submitted in the hold state
-
isBinary
Get whether the job is binary. A true value means the job is treated as a binary. A false value means the job is treated as a script. Note that the return value will be null if the value has not been set. See qsub -b.- Returns:
- whether the job is binary
-
getEnvironment
-
setAccount
Set the value of the account string. See qsub -A.- Parameters:
account- the account string
-
setAdvanceReservationId
Set the value of the advance reservation id. See qsub -ar.- Parameters:
advanceReservationId- the advance reservation id
-
setBinary
Set whether the job is binary. See qsub -b.- Parameters:
binary- whether the job is binary
-
setCheckpointSpecifier
Set the CheckpointSpecifier object that defines the checkpointing settings for the job. See qsub -ckpt -c.- Parameters:
checkpointSpecifier- the schpoint specifier- See Also:
-
setCommandArgs
Set the job's command arguments.- Parameters:
commandArgs- the new command arguments
-
setWorkingDirectory
Set the working directory. See qsub -wd -cwd.- Parameters:
cwd- the working directory
-
setDeadline
Set the deadline time. See qsub -dl.- Parameters:
deadline- the deadline time
-
setDisplay
Set the display string. See qsub -display.- Parameters:
display- the display string
-
setErrorPath
-
setHardQueue
-
setHardResourceRequirements
-
setHold
Set whether the job should be submitted in hold state. See qsub -h.- Parameters:
hold- whether the job should be submitted in hold state
-
setHoldJobIds
-
setHoldArrayJobIds
-
setInputPath
-
setJobContext
-
setMailRecipients
-
setMailSpecifier
Set the MailSpecifier object that represents when email notifications should be sent. See qsub -m.- Parameters:
mailSpecifier-- See Also:
-
setMasterQueue
-
setMergeStreams
Set whether the output and error streams should be merged. See qsub -j.- Parameters:
mergeStreams- whether to merge the streams
-
setName
-
setNotify
Set whether the job should be sent warning signals before being suspended or terminated. See qsub -notify.- Parameters:
notify- whether the job shoud receive warning signals
-
setOutputPath
-
setParallelEnvironment
Set the ParallelEnvironment object that represent's the job's PE settings. See qsub -pe.- Parameters:
pe- the job PE- See Also:
-
setBindingSpecifier
Set the BindingSpecifier object that represents the job to core binding settings. See qsub -binding.- Parameters:
binding- the job binding- See Also:
-
setPriority
Set the job's priority. See qsub -p.- Parameters:
priority- the job priority
-
setProject
Set the job's project. See qsub -P.- Parameters:
project- the job project
-
setRerunnable
Set whether the job can be requeued in the event of execd failure. See qsub -R.- Parameters:
rerunnable- whether the job can be requeued
-
setResourceReservation
Set whether the job should use resource reservation. See qsub -r.- Parameters:
reservation- whether the job should use resource reservation
-
setShell
Set whether the job should be launched by a shell. See qsub -shell.- Parameters:
shell- whether the job should use a shell
-
setShellPath
-
setSoftQueue
-
setSoftResourceRequirements
-
setStartTime
Set the job's start time. See qsub -a.- Parameters:
startTime- the start time
-
setTaskSpecifier
Set the TaskSpecifier object that defines the job's array task settings. See qsub -t.- Parameters:
taskSpecifier- the task specifier- See Also:
-
setVerification
Set the job's verification level. See qsub -w.- Parameters:
verification- the verification level
-
setEnvironment
-
clone
-