Class SimpleJobTemplate
- All Implemented Interfaces:
Serializable,JobTemplate
All non-primitive properties default to null. All boolean
properties default to false. All other primitive properties
default to zero.
The SimpleJobTemplate class is not thread safe. No attempt is made to prevent setters and getters from interfering with each other or the toString() method.
- Since:
- 1.0
- See Also:
-
Field Summary
Fields inherited from interface org.ggf.drmaa.JobTemplate
ACTIVE_STATE, HOLD_STATE, HOME_DIRECTORY, PARAMETRIC_INDEX, WORKING_DIRECTORY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetArgs()Get the arguments to the job.Returns the list of supported property names.booleanGet whether to block sending e-mail by default, regardless of the DRMS settings.Sets a deadline after which the DRMS will terminate the job.getEmail()Get the list of email addresses used to report the job completion and status.Gets how to direct the job's standard error.longGets how long the job may be in a running state before its limit has been exceeded.longGets the duration of the job's wall clock time limit.Get the job's standard input path.Get the opaque string specifying how to resolve site-specific resources and/or policies.Get the environment values that define the remote environment.Get the name of the job.intGet the job state at submission.booleanGets whether the error stream should be intermixed with the output stream.Get the opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies.Gets how to direct the job's standard output.Get the command string to execute as the job.longGets an estimate as to how long the job will need to remain in a running state to complete.longGets an estimate as to how much wall clock time job will need to complete.Get the earliest time when the job may be eligible to be run.Gets how to transfer files between hosts.Get the directory where the job is executed.voidSets the arguments to the job.voidsetBlockEmail(boolean blockEmail) Set whether to block sending e-mail by default, regardless of the DRMS settings.voidsetDeadlineTime(PartialTimestamp deadline) Sets a deadline after which the DRMS will terminate the job.voidSet the list of email addresses used to report the job completion and status.voidsetErrorPath(String errorPath) Sets how to direct the job's standard error.voidsetHardRunDurationLimit(long hardRunLimit) Sets how long the job may be in a running state before its limit has been exceeded, and therefore is terminated by the DRMS.voidsetHardWallclockTimeLimit(long hardWallclockLimit) Sets when the job's wall clock time limit has been exceeded.voidsetInputPath(String inputPath) Set the job's standard input path.voidsetJobCategory(String category) Set an opaque string specifying how to resolve site-specific resources and/or policies.voidsetJobEnvironment(Map env) Set the environment values that define the remote environment.voidsetJobName(String name) Set the name of the job.voidsetJobSubmissionState(int state) Set the job state at submission.voidsetJoinFiles(boolean join) Sets whether the error stream should be intermixed with the output stream.voidsetNativeSpecification(String spec) Set an opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies.voidsetOutputPath(String outputPath) Sets how to direct the job's standard output.voidsetRemoteCommand(String remoteCommand) Set the command string to execute as the job.voidsetSoftRunDurationLimit(long softRunLimit) Sets an estimate as to how long the job will need to remain in a running state to complete.voidsetSoftWallclockTimeLimit(long softWallclockLimit) Sets an estimate as to how much wall clock time job will need to complete.voidsetStartTime(PartialTimestamp startTime) Set the earliest time when the job may be eligible to be run.voidSpecifies, which of the standard I/O files (stdin, stdout and stderr) are to be transferred to/from the execution host.voidSet the directory where the job is executed.toString()Converts this JobTemplate into a String which contains all property settings.
-
Constructor Details
-
SimpleJobTemplate
public SimpleJobTemplate()Create a new instance of a JobTemplate.
-
-
Method Details
-
setRemoteCommand
Description copied from interface:JobTemplateSet the command string to execute as the job. The command is relative to the execution host and is evaluated on the execution host.- Specified by:
setRemoteCommandin interfaceJobTemplate- Parameters:
remoteCommand- the command to execute as the job- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getRemoteCommand
Description copied from interface:JobTemplateGet the command string to execute as the job.- Specified by:
getRemoteCommandin interfaceJobTemplate- Returns:
- the command to execute as the job or null if it has not been set
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setArgs
Description copied from interface:JobTemplateSets the arguments to the job.- Specified by:
setArgsin interfaceJobTemplate- Parameters:
args- the parameters passed as arguments to the job- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getArgs
Description copied from interface:JobTemplateGet the arguments to the job.- Specified by:
getArgsin interfaceJobTemplate- Returns:
- the parameters passed as arguments to the job or null if they have not been set
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setJobSubmissionState
Description copied from interface:JobTemplateSet the job state at submission. The states are HOLD_STATE and ACTIVE_STATE:- ACTIVE_STATE means job is eligible to run
- HOLD_STATE means job may be queued but is ineligible to run
A job submitted in the HOLD_STATE state can be made eligible to run through the Session.control() method using the Session.RELEASE constant.
- Specified by:
setJobSubmissionStatein interfaceJobTemplate- Parameters:
state- the job state at submission- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getJobSubmissionState
Description copied from interface:JobTemplateGet the job state at submission.- Specified by:
getJobSubmissionStatein interfaceJobTemplate- Returns:
- the job state at submission
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setJobEnvironment
Description copied from interface:JobTemplateSet the environment values that define the remote environment. The values override any remote environment values if there is a collision.- Specified by:
setJobEnvironmentin interfaceJobTemplate- Parameters:
env- the environment values that define the remote environment- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getJobEnvironment
Description copied from interface:JobTemplateGet the environment values that define the remote environment.- Specified by:
getJobEnvironmentin interfaceJobTemplate- Returns:
- the environment values that define the remote environment or null if it has not been set
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setWorkingDirectory
Description copied from interface:JobTemplateSet the directory where the job is executed. If the working directory is not set, behavior is implementation dependent. The working directory is evaluated relative to the execution host.A
HOME_DIRECTORYplaceholder at the beginning denotes that the remaining portion of the directory name is resolved relative to the job submiter's home directory on the execution host.The
PARAMETRIC_INDEXplaceholder can be used at any position within the directory name of a parametric job and will be replaced by the underlying DRM system with the parametric job's index.The directory name must be specified in a syntax that is common at the host where the job will be executed.
If no placeholder is used, an absolute directory specification is expected.
If the directory does not exist when the job is run, the job enters the state Session.FAILED.
- Specified by:
setWorkingDirectoryin interfaceJobTemplate- Parameters:
wd- the directory where the job is executed- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getWorkingDirectory
Description copied from interface:JobTemplateGet the directory where the job is executed.- Specified by:
getWorkingDirectoryin interfaceJobTemplate- Returns:
- the directory where the job is executed or null if it has not been set
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setJobCategory
Description copied from interface:JobTemplateSet an opaque string specifying how to resolve site-specific resources and/or policies. The job category can be used, for example, to submit jobs that are "low priority" jobs. It is then up to the local DRM administrator to map "low priority" to a set of appropriate job submission characteristics, such as reduced memory allowance or lower priority value.- Specified by:
setJobCategoryin interfaceJobTemplate- Parameters:
category- an opaque string specifying how to resolve site-specific resources and/or policies.- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getJobCategory
Description copied from interface:JobTemplateGet the opaque string specifying how to resolve site-specific resources and/or policies.- Specified by:
getJobCategoryin interfaceJobTemplate- Returns:
- the opaque string specifying how to resolve site-specific resources and/or policies or null if it has not been set
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setNativeSpecification
Description copied from interface:JobTemplateSet an opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies.- Specified by:
setNativeSpecificationin interfaceJobTemplate- Parameters:
spec- an opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getNativeSpecification
Description copied from interface:JobTemplateGet the opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies.- Specified by:
getNativeSpecificationin interfaceJobTemplate- Returns:
- the opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies or null if it has not been set
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setEmail
Description copied from interface:JobTemplateSet the list of email addresses used to report the job completion and status.- Specified by:
setEmailin interfaceJobTemplate- Parameters:
email- the list of email addresses used to report the job completion and status.- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getEmail
Description copied from interface:JobTemplateGet the list of email addresses used to report the job completion and status.- Specified by:
getEmailin interfaceJobTemplate- Returns:
- the list of email addresses used to report the job completion and status or null if they have not been set
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setBlockEmail
Description copied from interface:JobTemplateSet whether to block sending e-mail by default, regardless of the DRMS settings. This property can only be used to prevent email from being sent. It cannot force the DRM to send email.- Specified by:
setBlockEmailin interfaceJobTemplate- Parameters:
blockEmail- whether to block sending e-mail by default- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getBlockEmail
Description copied from interface:JobTemplateGet whether to block sending e-mail by default, regardless of the DRMS settings.- Specified by:
getBlockEmailin interfaceJobTemplate- Returns:
- whether to block sending e-mail by default
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setStartTime
Description copied from interface:JobTemplateSet the earliest time when the job may be eligible to be run.- Specified by:
setStartTimein interfaceJobTemplate- Parameters:
startTime- the earliest time when the job may be eligible to be run- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getStartTime
Description copied from interface:JobTemplateGet the earliest time when the job may be eligible to be run.- Specified by:
getStartTimein interfaceJobTemplate- Returns:
- the earliest time when the job may be eligible to be run or null if it has not been set
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setJobName
Description copied from interface:JobTemplateSet the name of the job. A job name will be comprised of alpha-numeric and _ characters. The DRMAA implementation may truncate client provided job names to an implementation defined length that is at least 31 characters.- Specified by:
setJobNamein interfaceJobTemplate- Parameters:
name- the name of the job- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getJobName
Description copied from interface:JobTemplateGet the name of the job.- Specified by:
getJobNamein interfaceJobTemplate- Returns:
- the name of the job or null if it has not been set
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setInputPath
Description copied from interface:JobTemplateSet the job's standard input path. Unless set elsewhere, if not explicitly set in the job template, the job is started with an empty input stream.If set, specifies the network path of the job's input stream in the form of [hostname]:file_path
When the transferFiles property is supported and has it's inputStream property set, the input file will be fetched by the underlying DRM system from the specified host or from the submit host if no hostname is specified.
When the transferFiles property is not supported or does not have its inputStream property set, the input file is always expected to be at the host where the job is executed irrespective of a whether a hostname is specified in the path.
The
PARAMETRIC_INDEXplaceholder can be used at any position within the file path of parametric job templates and will be replaced by the underlying DRM system with the parametric job's index.A
HOME_DIRECTORYplaceholder at the beginning of the file path denotes that the remaining portion of the file path is relative to the job submiter's home directory on the host where the file is located.A
WORKING_DIRECTORYplaceholder at the beginning of the file path denotes that the remaining portion of the file path is relative to the job's working directory on the host where the file is located.The file path must be specified in a syntax that is common at the host where the file is located.
When the job is run, if this property is set, and the file can't be read, the job will enter the state Session.FAILED.
- Specified by:
setInputPathin interfaceJobTemplate- Parameters:
inputPath- the job's standard input path- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getInputPath
Description copied from interface:JobTemplateGet the job's standard input path.- Specified by:
getInputPathin interfaceJobTemplate- Returns:
- the job's standard input path or null if it has not been set
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setOutputPath
Description copied from interface:JobTemplateSets how to direct the job's standard output. If not explicitly set in the job template, the whereabouts of the jobs output stream is not defined. If set, specifies the network path of the job's output stream file in the form of [hostname]:file_pathWhen the transferFiles property is supported and has its outputStream property set, the output file will be transferred by the underlying DRM system to the specified host or to the submit host if no hostname is specified.
When the transferFiles property is not supported or does not have it's outputStream property set, the output file is always kept at the host where the job is executed irrespective of a whether a hostname is specified in the path.
The
PARAMETRIC_INDEXplaceholder can be used at any position within the file path of parametric job templates and will be replaced by the underlying DRM system with the parametric job's index.A
HOME_DIRECTORYplaceholder at the beginning of the file path denotes that the remaining portion of the file path is relative to the job submiter's home directory on the host where the file is located.A
WORKING_DIRECTORYplaceholder at the beginning of the file path denotes that the remaining portion of the file path is relative to the job's working directory on the host where the file is located.The file path must be specified in a syntax that is common at the host where the file is located.
When the job is run, if this property is set, and the file can't be written before execution the job will enter the state Session.FAILED.
- Specified by:
setOutputPathin interfaceJobTemplate- Parameters:
outputPath- how to direct the job's standard output- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getOutputPath
Description copied from interface:JobTemplateGets how to direct the job's standard output.- Specified by:
getOutputPathin interfaceJobTemplate- Returns:
- how to direct the job's standard output or null if it has not been set
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setErrorPath
Description copied from interface:JobTemplateSets how to direct the job's standard error. If not explicitly set in the job template, the whereabouts of the job's error stream is not defined. If set, specifies the network path of the job's error stream file in the form [hostname]:file_pathWhen the transferFiles property is supported and has its errorStream property set, the error file will be transferred by the underlying DRM system to the specified host or to the submit host if no hostname is specified.
When the transferFiles property is not supported or does not have it's errorStream property set, the error file is always kept at the host where the job is executed irrespective of a whether a hostname is specified in the path.
The
PARAMETRIC_INDEXplaceholder can be used at any position within the file path of parametric job templates and will be replaced by the underlying DRM system with the parametric job's index.A
HOME_DIRECTORYplaceholder at the beginning of the file path denotes that the remaining portion of the file path is relative to the job submiter's home directory on the host where the file is located.A
WORKING_DIRECTORYplaceholder at the beginning of the file path denotes that the remaining portion of the file path is relative to the job's working directory on the host where the file is located.The file path must be specified in a syntax that is common at the host where the file is located.
When the job is run, if this property is set, and the file can't be written before execution the job will enter the state Session.FAILED.
- Specified by:
setErrorPathin interfaceJobTemplate- Parameters:
errorPath- how to direct the job's standard error- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getErrorPath
Description copied from interface:JobTemplateGets how to direct the job's standard error.- Specified by:
getErrorPathin interfaceJobTemplate- Returns:
- how to direct the job's standard error
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setJoinFiles
Description copied from interface:JobTemplateSets whether the error stream should be intermixed with the output stream. If not explicitly set in the job template this property defaults tofalse.If
trueis specified the underlying DRM system will ignore the value of the errorPath property and intermix the standard error stream with the standard output stream as specified by the outputPath property.- Specified by:
setJoinFilesin interfaceJobTemplate- Parameters:
join- whether the error stream should be intermixed with the output stream- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getJoinFiles
Description copied from interface:JobTemplateGets whether the error stream should be intermixed with the output stream.- Specified by:
getJoinFilesin interfaceJobTemplate- Returns:
- Whether the error stream should be intermixed with the output stream
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setTransferFiles
Description copied from interface:JobTemplateSpecifies, which of the standard I/O files (stdin, stdout and stderr) are to be transferred to/from the execution host. If not set, defaults to the equivalent of a FileTransferMode instance with all properties set to false. See inputPath, outputPath and errorPath setters for information about how to specify the standard input file, standard output file, and standard error file.If the FileTransferMode instance's errorStream property is set to
true, the errorPath property is taken to specify the location to which error files should be transfered after the job finishes.If the FileTransferMode instance's inputStream property is set to
true, the inputPath property is taken to specify the location from which input files should be transfered before the job starts.If the FileTransferMode instance's outputStream property is set to
true, the outputPath property is taken to specify the location to which output files should be transfered after the job finishes.- Specified by:
setTransferFilesin interfaceJobTemplate- Parameters:
mode- how to transfer files between hosts.- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
getTransferFiles
Description copied from interface:JobTemplateGets how to transfer files between hosts.- Specified by:
getTransferFilesin interfaceJobTemplate- Returns:
- how to transfer files between hosts.
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setDeadlineTime
Description copied from interface:JobTemplateSets a deadline after which the DRMS will terminate the job.- Specified by:
setDeadlineTimein interfaceJobTemplate- Parameters:
deadline- the deadline after which the DRMS will terminate the job- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getDeadlineTime
Description copied from interface:JobTemplateSets a deadline after which the DRMS will terminate the job.- Specified by:
getDeadlineTimein interfaceJobTemplate- Returns:
- the deadline after which the DRMS will terminate the job
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setHardWallclockTimeLimit
Description copied from interface:JobTemplateSets when the job's wall clock time limit has been exceeded. The DRMS will terminate a job that has exceeded its wall clock time limit. Note that time spent suspended is also accounted for here.- Specified by:
setHardWallclockTimeLimitin interfaceJobTemplate- Parameters:
hardWallclockLimit- when the job's wall clock time limit has been exceeded. Specified in seconds- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getHardWallclockTimeLimit
Description copied from interface:JobTemplateGets the duration of the job's wall clock time limit.- Specified by:
getHardWallclockTimeLimitin interfaceJobTemplate- Returns:
- when the job's wall clock time limit has been exceeded. Specified in seconds
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setSoftWallclockTimeLimit
Description copied from interface:JobTemplateSets an estimate as to how much wall clock time job will need to complete. Note that time spent suspended is also accounted for here.This attribute is intended to assist the scheduler. If the time specified in insufficient, the drmaa-implementation may impose a scheduling penalty.
- Specified by:
setSoftWallclockTimeLimitin interfaceJobTemplate- Parameters:
softWallclockLimit- an estimate as to how much wall clock time job will need to complete. Specified in seconds- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getSoftWallclockTimeLimit
Description copied from interface:JobTemplateGets an estimate as to how much wall clock time job will need to complete.- Specified by:
getSoftWallclockTimeLimitin interfaceJobTemplate- Returns:
- an estimate as to how much wall clock time job will need to complete. Specified in seconds
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setHardRunDurationLimit
Description copied from interface:JobTemplateSets how long the job may be in a running state before its limit has been exceeded, and therefore is terminated by the DRMS.- Specified by:
setHardRunDurationLimitin interfaceJobTemplate- Parameters:
hardRunLimit- how long the job may be in a running state before its limit has been exceeded. Specified in seconds- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getHardRunDurationLimit
Description copied from interface:JobTemplateGets how long the job may be in a running state before its limit has been exceeded.- Specified by:
getHardRunDurationLimitin interfaceJobTemplate- Returns:
- how long the job may be in a running state before its limit has been exceeded. Specified in seconds
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
setSoftRunDurationLimit
Description copied from interface:JobTemplateSets an estimate as to how long the job will need to remain in a running state to complete. This attribute is intended to assist the scheduler. If the time specified in insufficient, the DRMAA implementation may impose a scheduling penalty.- Specified by:
setSoftRunDurationLimitin interfaceJobTemplate- Parameters:
softRunLimit- an estimate as to how long the job will need to remain in a running state to complete. Specified in seconds- Throws:
DrmaaException- May be one of the following:- InvalidAttributeFormatException -- the format of the argument is invalid
- InvalidAttributeValueException -- the value of the argument is invalid
- ConflictingAttributeValuesException -- the value of the argument conflicts with the value of another job template property
- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- IllegalArgumentException -- an argument is invalid
- InternalException -- an error has occured in the DRMAA implementation
-
getSoftRunDurationLimit
Description copied from interface:JobTemplateGets an estimate as to how long the job will need to remain in a running state to complete.- Specified by:
getSoftRunDurationLimitin interfaceJobTemplate- Returns:
- an estimate as to how long the job will need to remain in a running state to complete. Specified in seconds
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
- See Also:
-
getAttributeNames
Description copied from interface:JobTemplateReturns the list of supported property names. This list includes supported DRMAA reserved property names (both required and optional) and DRM-specific property names.- Specified by:
getAttributeNamesin interfaceJobTemplate- Returns:
- the list of supported property names
- Throws:
DrmaaException- May be one of the following:- NoActiveSessionException -- the session has not yet been initialized or has already been exited
- DrmCommunicationException -- the DRMAA implementation was unable to contact the DRM
- AuthorizationException -- the executing user does not have sufficient permissions to execute the desired action
- InternalException -- an error has occured in the DRMAA implementation
-
toString
Converts this JobTemplate into a String which contains all property settings. The generated string is then cached and reused until one of the property settings is modified.
-