Package com.sun.grid.jsv
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 enum
The possible values for the verification property. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
String value of the context property that indicates the JSV is running on the master node.static final String
String value of the client property that indicates the JSV is running on the master node.static final String
String value of the context property that indicates the JSV is running on the master node. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JobDescription
clone()
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.void
setAccount
(String account) Set the value of the account string.void
setAdvanceReservationId
(Integer advanceReservationId) Set the value of the advance reservation id.void
Set whether the job is binary.void
setBindingSpecifier
(BindingSpecifier binding) Set the BindingSpecifier object that represents the job to core binding settings.void
setCheckpointSpecifier
(CheckpointSpecifier checkpointSpecifier) Set the CheckpointSpecifier object that defines the checkpointing settings for the job.void
setCommandArgs
(String[] commandArgs) Set the job's command arguments.void
setDeadline
(Calendar deadline) Set the deadline time.void
setDisplay
(String display) Set the display string.void
setEnvironment
(Map<String, String> environment) Set the job's environment variable.void
setErrorPath
(Map<String, String> path) Set the error path.void
setHardQueue
(List<String> queues) Set the hard queue list.void
setHardResourceRequirements
(Map<String, String> resources) Set the hard resource requirements map.void
Set whether the job should be submitted in hold state.void
setHoldArrayJobIds
(List<String> jobIds) Set the list of array job identifiers on which the job tasks depened.void
setHoldJobIds
(List<String> jobIds) Set the list of job identifiers on which the job depeneds.void
setInputPath
(Map<String, String> path) Set the input path.void
setJobContext
(Map<String, String> context) Set the job's context.void
setJobShare
(Integer jobShare) Set the job's functional ticket share See qsub -js.void
setMailRecipients
(List<String> recipients) Set the list of email recipients to be notified on job events.void
setMailSpecifier
(MailSpecifier mailSpecifier) Set the MailSpecifier object that represents when email notifications should be sent.void
setMasterQueue
(List<String> queues) Set the master queue list.void
setMergeStreams
(Boolean mergeStreams) Set whether the output and error streams should be merged.void
Set the job's name.void
Set whether the job should be sent warning signals before being suspended or terminated.void
setOutputPath
(Map<String, String> path) Set the output path.void
Set the ParallelEnvironment object that represent's the job's PE settings.void
setPriority
(Integer priority) Set the job's priority.void
setProject
(String project) Set the job's project.void
setRerunnable
(Boolean rerunnable) Set whether the job can be requeued in the event of execd failure.void
setResourceReservation
(Boolean reservation) Set whether the job should use resource reservation.void
Set whether the job should be launched by a shell.void
setShellPath
(Map<String, String> path) Set the job's shell path.void
setSoftQueue
(List<String> queues) Set the job's soft queue list See qsub -soft -q.void
setSoftResourceRequirements
(Map<String, String> resources) Set the job's soft resource requirements map.void
setStartTime
(Calendar startTime) Set the job's start time.void
setTaskSpecifier
(TaskSpecifier taskSpecifier) Set the TaskSpecifier object that defines the job's array task settings.void
setVerification
(JobDescription.Verification verification) Set the job's verification level.void
Set 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
Get the account string. See qsub -A.- Returns:
- the account string
-
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
Get the job command.- Returns:
- the job command
-
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
Get the job's error path. 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 -e.- Returns:
- the error path
-
getGroup
Get the primary group id for the job's submitter.- Returns:
- the group id
-
getHardQueue
Get the hard queue list. 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 -q.- Returns:
- the hard queue list
-
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
Get the job's input path. 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 -i.- Returns:
- the input path
-
getJobContext
Get the job's job context 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 -ac -dc -sc.- Returns:
- the job context
-
getJobId
Get the job's id- Returns:
- the job id
-
getMailRecipients
Get the list of email recipients 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 email recipient list
-
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
Get the master queue list. 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 -masterq.- Returns:
- the master queue list
-
getName
Get the job's name.- Returns:
- the job name
-
getOutputPath
Get the job's output path. 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 -o.- Returns:
- the output path
-
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
Get the job's project See qsub -P.- Returns:
- the job project
-
getShellPath
Get the shell path list. 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 -S.- Returns:
- the shell path list
-
getSoftQueue
Get the soft queue list. 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 -q.- Returns:
- the soft queue list
-
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
Get the submitting user.- Returns:
- the submitting user
-
getVerification
Get the verification level. See qsub -w.- Returns:
- the verification level
-
getVersion
Get the JSV framework version.- Returns:
- the JSV version
-
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
Get the job's environment variables. 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 -v.- Returns:
- the environment variables
-
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
Set the error path. See qsub -e.- Parameters:
path
- the error path
-
setHardQueue
Set the hard queue list. See qsub -hard -q.- Parameters:
queues
- the hard queue list
-
setHardResourceRequirements
Set the hard resource requirements map. See qsub -hard -l.- Parameters:
resources
- the hard resource requirements
-
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
Set the list of job identifiers on which the job depeneds. See qsub -hold_jid.- Parameters:
jobIds
- the job dependency list
-
setHoldArrayJobIds
Set the list of array job identifiers on which the job tasks depened. See qsub -hold_jid_ad.- Parameters:
jobIds
- the array job dependency list
-
setInputPath
Set the input path. See qsub -i.- Parameters:
path
- the error path
-
setJobContext
Set the job's context. See qsub -ac -dc -sc.- Parameters:
context
- the job context
-
setMailRecipients
Set the list of email recipients to be notified on job events. See qsub -M.- Parameters:
recipients
- the email list
-
setMailSpecifier
Set the MailSpecifier object that represents when email notifications should be sent. See qsub -m.- Parameters:
mailSpecifier
-- See Also:
-
setMasterQueue
Set the master queue list. See qsub -masterq.- Parameters:
queues
- the master queue list
-
setMergeStreams
Set whether the output and error streams should be merged. See qsub -j.- Parameters:
mergeStreams
- whether to merge the streams
-
setName
Set the job's name. See qsub -N.- Parameters:
name
- the job name
-
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
Set the output path. See qsub -o.- Parameters:
path
- the output path
-
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
Set the job's shell path. See qsub -S.- Parameters:
path
- the shell path
-
setSoftQueue
Set the job's soft queue list See qsub -soft -q.- Parameters:
queues
- the soft queue list
-
setSoftResourceRequirements
Set the job's soft resource requirements map. See qsub -soft -l.- Parameters:
resources
- the soft resource requirements
-
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
Set the job's environment variable. See qsub -v.- Parameters:
environment
- the environment variables
-
clone
-