org.ggf.drmaa
Class JobTemplate

java.lang.Object
  extended byorg.ggf.drmaa.JobTemplate
Direct Known Subclasses:
JobTemplateImpl

public class JobTemplate
extends java.lang.Object

This class represents a template to be used for the creation of a job. The properties set on a JobTemplate object as used to create a new job and set up the new job's environment.

There is a 1:n relationship between JobTemplates and jobs. A single JobTemplate can be used to submit any number of jobs. Once a job has been submitted, e.g. via Session.runJob(), the JobTemplate no longer has any affect on the job. Changes made to the JobTemplate will have no affect on already running jobs. Deleting the JobTemplate (via Session.deleteJobTemplate()) also has no effect on running jobs.

Once a JobTemplate has been created (via Session.createJobTemplate()), it is the responsibility of the developer to delete it when no longer needed (via Session.deleteJobTemplate ()). Failure to do so may result in a memory leak.

Example:

public static void main (String[] args) {
   SessionFactory factory = SessionFactory.getFactory ();
   Session session = factory.getSession ();

   try {
      session.init (null);
      JobTemplate jt = session.createJobTemplate ();
      jt.setRemoteCommand ("sleeper.sh");
      jt.setWorkingDirectory (HOME_DIRECTORY + "/jobs");
      jt.setArgs (new String[] {"5"});

      String id = session.runJob (jt);

      session.deleteJobTemplate (jt);
      session.exit ();
   }
   catch (DrmaaException e) {
      System.out.println ("Error: " + e.getMessage ());
   }
 }
 

Since:
0.4.2
Author:
dan.templeton@sun.com
See Also:
Session

Field Summary
static int ACTIVE
          jobSumissionState which means the job has been queued and is eligible to run
protected  java.lang.String[] args
          Input parameters passed as arguments to the job
protected  boolean blockEmail
          Blocks sending e-mail by default, regardless of the DRMS setting
protected  java.lang.String category
          An implementation-defined string specifying how to resolve site-specific resources and/or policies
protected  java.lang.String[] email
          E-mail addresses used to report the job completion and status
protected  java.util.Properties env
          The environment values that define the job's remote environment
protected  java.lang.String errorPath
          The job's standard error stream
static int HOLD
          jobSubmissionState which means the job has been queued but it is not eligible to run
static java.lang.String HOME_DIRECTORY
          Placeholder which represents the home directory in the workingDirectory, inputPath, outputPath, and errorPath properties
protected  java.lang.String inputPath
          The job's standard input stream
protected  boolean join
          Whether the error stream should be intermixed with the output stream
protected  java.lang.String name
          Job name
protected  java.lang.String outputPath
          The job's standard output stream
static java.lang.String PARAMETRIC_INDEX
          Placeholder which represents the task id for a task in a parametric job in the workingDirectory, inputPath, outputPath, and errorPath properties
protected  java.lang.String remoteCommand
          Remote command to execute
protected  java.lang.String spec
          An implementation-defined string that is passed by the end user to DRMAA to specify site-specific resources and/or policies
protected  PartialTimestamp startTime
          The earliest time when the job may be eligible to be run
protected  int state
          Job state at submission, either HOLD or ACTIVE
protected  java.lang.String wd
          The directory where the job is executed.
static java.lang.String WORKING_DIRECTORY
          Placeholder which represents the working directory in the workingDirectory, inputPath, outputPath, and errorPath properties
 
Constructor Summary
JobTemplate()
           
 
Method Summary
 java.lang.String[] getArgs()
          Get The parameters passed as arguments to the job.
 java.util.List getAttributeNames()
          Returns the list of supported property names.
 boolean getBlockEmail()
          Get whether to block sending e-mail by default, regardless of the DRMS settings.
 PartialTimestamp getDeadlineTime()
          Sets a deadline after which the DRMS will terminate the job.
 java.lang.String[] getEmail()
          Get the list of email addresses used to report the job completion and status.
 java.lang.String getErrorPath()
          Gets how to direct the job's standard error.
 long getHardRunDurationLimit()
          Gets how long the job may be in a running state before its limit has been exceeded, and therefore is terminated by the DRMS.
 long getHardWallclockTimeLimit()
          Gets the duration of the job's wall clock time limit.
 java.lang.String getInputPath()
          Get the job's standard input path.
 java.lang.String getJobCategory()
          Get the opaque string specifying how to resolve site-specific resources and/or policies.
 java.util.Properties getJobEnvironment()
          Get the environment values that define the remote environment.
 java.lang.String getJobName()
          Get the name of the job.
 int getJobSubmissionState()
          Get the job state at submission.
 boolean getJoinFiles()
          Gets whether the error stream should be intermixed with the output stream.
 java.lang.String getNativeSpecification()
          Get the opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies.
protected  java.util.List getOptionalAttributeNames()
          This method returns the names of all optional and implementation-specific properties supported by this DRMAA implementation.
 java.lang.String getOutputPath()
          Gets how to direct the job's standard output.
 java.lang.String getRemoteCommand()
          Get the command string to execute as the job.
 long getSoftRunDurationLimit()
          Gets an estimate as to how long the job will need to remain in a running state to complete.
 long getSoftWallclockTimeLimit()
          Gets an estimate as to how much wall clock time job will need to complete.
 PartialTimestamp getStartTime()
          Get the earliest time when the job may be eligible to be run.
 FileTransferMode getTransferFiles()
          Gets how to transfer files between hosts.
 java.lang.String getWorkingDirectory()
          Get the directory where the job is executed.
 void setArgs(java.lang.String[] args)
          Set the parameters passed as arguments to the job.
 void setBlockEmail(boolean blockEmail)
          Set whether to block sending e-mail by default, regardless of the DRMS settings.
 void setDeadlineTime(PartialTimestamp deadline)
          Sets a deadline after which the DRMS will terminate the job.
 void setEmail(java.lang.String[] email)
          Set the list of email addresses used to report the job completion and status.
 void setErrorPath(java.lang.String errorPath)
          Sets how to direct the job's standard error.
 void setHardRunDurationLimit(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.
 void setHardWallclockTimeLimit(long hardWallclockLimit)
          Sets when the job's wall clock time limit has been exceeded.
 void setInputPath(java.lang.String inputPath)
          Set the job's standard input path.
 void setJobCategory(java.lang.String category)
          Set an opaque string specifying how to resolve site-specific resources and/or policies.
 void setJobEnvironment(java.util.Properties env)
          Set the environment values that define the remote environment.
 void setJobName(java.lang.String name)
          Set the name of the job.
 void setJobSubmissionState(int state)
          Set the job state at submission.
 void setJoinFiles(boolean join)
          Sets whether the error stream should be intermixed with the output stream.
 void setNativeSpecification(java.lang.String spec)
          Set an opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies.
 void setOutputPath(java.lang.String outputPath)
          Sets how to direct the job's standard output.
 void setRemoteCommand(java.lang.String remoteCommand)
          Set the command string to execute as the job.
 void setSoftRunDurationLimit(long softRunLimit)
          Sets an estimate as to how long the job will need to remain in a running state to complete.
 void setSoftWallclockTimeLimit(long softWallclockLimit)
          Sets an estimate as to how much wall clock time job will need to complete.
 void setStartTime(PartialTimestamp startTime)
          Set the earliest time when the job may be eligible to be run.
 void setTransferFiles(FileTransferMode mode)
          Sets how to transfer files between hosts.
 void setWorkingDirectory(java.lang.String wd)
          Set the directory where the job is executed.
 java.lang.String toString()
          Converts this JobTemplate into a String which contains all property settings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HOLD

public static final int HOLD
jobSubmissionState which means the job has been queued but it is not eligible to run

See Also:
Constant Field Values

ACTIVE

public static final int ACTIVE
jobSumissionState which means the job has been queued and is eligible to run

See Also:
Constant Field Values

HOME_DIRECTORY

public static final java.lang.String HOME_DIRECTORY
Placeholder which represents the home directory in the workingDirectory, inputPath, outputPath, and errorPath properties

See Also:
Constant Field Values

WORKING_DIRECTORY

public static final java.lang.String WORKING_DIRECTORY
Placeholder which represents the working directory in the workingDirectory, inputPath, outputPath, and errorPath properties

See Also:
Constant Field Values

PARAMETRIC_INDEX

public static final java.lang.String PARAMETRIC_INDEX
Placeholder which represents the task id for a task in a parametric job in the workingDirectory, inputPath, outputPath, and errorPath properties

See Also:
Constant Field Values

remoteCommand

protected java.lang.String remoteCommand
Remote command to execute


args

protected java.lang.String[] args
Input parameters passed as arguments to the job


state

protected int state
Job state at submission, either HOLD or ACTIVE


env

protected java.util.Properties env
The environment values that define the job's remote environment


wd

protected java.lang.String wd
The directory where the job is executed.


category

protected java.lang.String category
An implementation-defined string specifying how to resolve site-specific resources and/or policies


spec

protected java.lang.String spec
An implementation-defined string that is passed by the end user to DRMAA to specify site-specific resources and/or policies


email

protected java.lang.String[] email
E-mail addresses used to report the job completion and status


blockEmail

protected boolean blockEmail
Blocks sending e-mail by default, regardless of the DRMS setting


startTime

protected PartialTimestamp startTime
The earliest time when the job may be eligible to be run


name

protected java.lang.String name
Job name


inputPath

protected java.lang.String inputPath
The job's standard input stream


outputPath

protected java.lang.String outputPath
The job's standard output stream


errorPath

protected java.lang.String errorPath
The job's standard error stream


join

protected boolean join
Whether the error stream should be intermixed with the output stream

Constructor Detail

JobTemplate

public JobTemplate()
Method Detail

setRemoteCommand

public void setRemoteCommand(java.lang.String remoteCommand)
                      throws DrmaaException
Set the command string to execute as the job. The command is relative to the execution host and is evaluated on the execution host. No binary file management is done.

Parameters:
remoteCommand - The command to execute as the job
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeFormatException
  • InvalidAttributeValueException
  • InvalidArgumentException
  • ConflictingAttributeValuesException

getRemoteCommand

public java.lang.String getRemoteCommand()
Get the command string to execute as the job. The command is relative to the execution host and is evaluated on the execution host. No binary file management is done.

Returns:
The command to execute as the job or null if it has not been set

setArgs

public void setArgs(java.lang.String[] args)
             throws DrmaaException
Set the parameters passed as arguments to the job.

Parameters:
args - The parameters passed as arguments to the job
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeFormatException
  • InvalidAttributeValueException
  • InvalidArgumentException
  • ConflictingAttributeValuesException

getArgs

public java.lang.String[] getArgs()
Get The parameters passed as arguments to the job.

Returns:
The parameters passed as arguments to the job or null if they have not been set

setJobSubmissionState

public void setJobSubmissionState(int state)
                           throws DrmaaException
Set the job state at submission. This might be useful for a rather rudimentary, but very general, job dependent execution. The states are HOLD and ACTIVE:
ACTIVE means job has been queued, and is eligible to run HOLD means job has been queued, but it is not eligible to run

Parameters:
state - The job state at submission
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeValueException
  • ConflictingAttributeValuesException

getJobSubmissionState

public int getJobSubmissionState()
Get the job state at submission. The states are HOLD and ACTIVE:
ACTIVE means job has been queued, and is eligible to run HOLD means job has been queued, but it is not eligible to run

Returns:
The job state at submission

setJobEnvironment

public void setJobEnvironment(java.util.Properties env)
                       throws DrmaaException
Set the environment values that define the remote environment. The values override the remote environment values if there is a collision.

Parameters:
env - The environment values that define the remote environment
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeFormatException
  • InvalidAttributeValueException
  • InvalidArgumentException
  • ConflictingAttributeValuesException

getJobEnvironment

public java.util.Properties getJobEnvironment()
Get the environment values that define the remote environment. The values override the remote environment values if there is a collision.

Returns:
The environment values that define the remote environment or null if it has not been set

setWorkingDirectory

public void setWorkingDirectory(java.lang.String wd)
                         throws DrmaaException
Set 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_DIRECTORY placeholder 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_INDEX placeholder can be used at any position within the directory name of parametric jobs and will be replaced by the underlying DRM system with the parametric jobs' 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 FAILED.

Parameters:
wd - The directory where the job is executed
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeFormatException
  • InvalidAttributeValueException
  • InvalidArgumentException
  • ConflictingAttributeValuesException

getWorkingDirectory

public java.lang.String getWorkingDirectory()
Get the directory where the job is executed. The working directory is evaluated relative to the execution host.
A HOME_DIRECTORY placeholder 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_INDEX placeholder can be used at any position within the directory name of parametric jobs and will be replaced by the underlying DRM system with the parametric jobs' index.
The directory name is 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 represented.

Returns:
The directory where the job is executed or null if it has not been set

setJobCategory

public void setJobCategory(java.lang.String category)
                    throws DrmaaException
Set an opaque string specifying how to resolve site-specific resources and/or policies.

Parameters:
category - An opaque string specifying how to resolve site-specific resources and/or policies.
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeFormatException
  • InvalidAttributeValueException
  • InvalidArgumentException
  • ConflictingAttributeValuesException

getJobCategory

public java.lang.String getJobCategory()
Get the opaque string specifying how to resolve site-specific resources and/or policies.

Returns:
The opaque string specifying how to resolve site-specific resources and/or policies or null if it has not been set

setNativeSpecification

public void setNativeSpecification(java.lang.String spec)
                            throws DrmaaException
Set an opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies.

Parameters:
spec - An opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeFormatException
  • InvalidAttributeValueException
  • InvalidArgumentException
  • ConflictingAttributeValuesException

getNativeSpecification

public java.lang.String getNativeSpecification()
Get the opaque string that is passed by the end user to DRMAA to specify site-specific resources and/or policies.

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

setEmail

public void setEmail(java.lang.String[] email)
              throws DrmaaException
Set the list of email addresses used to report the job completion and status.

Parameters:
email - The list of email addresses used to report the job completion and status.
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeFormatException
  • InvalidAttributeValueException
  • InvalidArgumentException
  • ConflictingAttributeValuesException

getEmail

public java.lang.String[] getEmail()
Get the list of email addresses used to report the job completion and status.

Returns:
The list of email addresses used to report the job completion and status or null if they have not been set

setBlockEmail

public void setBlockEmail(boolean blockEmail)
                   throws DrmaaException
Set 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.

Parameters:
blockEmail - Whether to block sending e-mail by default
Throws:
DrmaaException - Maybe be one of the following:
  • ConflictingAttributeValuesException

getBlockEmail

public boolean getBlockEmail()
Get whether to block sending e-mail by default, regardless of the DRMS settings.

Returns:
Whether to block sending e-mail by default

setStartTime

public void setStartTime(PartialTimestamp startTime)
                  throws DrmaaException
Set the earliest time when the job may be eligible to be run.

Parameters:
startTime - The earliest time when the job may be eligible to be run
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeValueException
  • InvalidArgumentException
  • ConflictingAttributeValuesException

getStartTime

public PartialTimestamp getStartTime()
Get the earliest time when the job may be eligible to be run.

Returns:
The earliest time when the job may be eligible to be run or null if it has not been set

setJobName

public void setJobName(java.lang.String name)
                throws DrmaaException
Set 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.

Parameters:
name - The name of the job
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeFormatException
  • InvalidAttributeValueException
  • InvalidArgumentException
  • ConflictingAttributeValuesException

getJobName

public java.lang.String getJobName()
Get the name of the job. A job name will be comprised of alpha-numeric and _ characters.

Returns:
The name of the job or null if it has not been set

setInputPath

public void setInputPath(java.lang.String inputPath)
                  throws DrmaaException
Set 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 it's 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_INDEX placeholder 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_DIRECTORY placeholder 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_DIRECTORY placeholder 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 FAILED.

Parameters:
inputPath - The job's standard input path
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeFormatException
  • InvalidAttributeValueException
  • InvalidArgumentException
  • ConflictingAttributeValuesException

getInputPath

public java.lang.String getInputPath()
Get the job's standard input path. 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 it's 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_INDEX placeholder 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_DIRECTORY placeholder 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_DIRECTORY placeholder 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.

Returns:
The job's standard input path or null if it has not been set

setOutputPath

public void setOutputPath(java.lang.String outputPath)
                   throws DrmaaException
Sets 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_path
When the transferFiles property is supported and has it's 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_INDEX placeholder 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_DIRECTORY placeholder 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_DIRECTORY placeholder 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 FAILED.

Parameters:
outputPath - How to direct the job's standard output
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeFormatException
  • InvalidAttributeValueException
  • InvalidArgumentException
  • ConflictingAttributeValuesException

getOutputPath

public java.lang.String getOutputPath()
Gets how to direct the job's standard output. If set, specifies the network path of the job's output stream file in the form of [hostname]:file_path
When the transferFiles property is supported and has it's 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_INDEX placeholder 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_DIRECTORY placeholder 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_DIRECTORY placeholder 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.

Returns:
How to direct the job's standard output or null if it has not been set

setErrorPath

public void setErrorPath(java.lang.String errorPath)
                  throws DrmaaException
Sets 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_path
When the transferFiles property is supported and has it's 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_INDEX placeholder 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_DIRECTORY placeholder 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_DIRECTORY placeholder 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 FAILED.

Parameters:
errorPath - How to direct the job's standard error
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeFormatException
  • InvalidAttributeValueException
  • InvalidArgumentException
  • ConflictingAttributeValuesException

getErrorPath

public java.lang.String getErrorPath()
Gets 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_path
When the transferFiles property is supported and has it's 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_INDEX placeholder 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_DIRECTORY placeholder 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_DIRECTORY placeholder 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.

Returns:
How to direct the job's standard error

setJoinFiles

public void setJoinFiles(boolean join)
                  throws DrmaaException
Sets whether the error stream should be intermixed with the output stream. If not explicitly set in the job template this property defaults to false.
If true is specified the underlying DRM system will ignore the value of the errorPath attribute and intermix the standard error stream with the standard output stream as specified with outputPath.

Parameters:
join - Whether the error stream should be intermixed with the output stream
Throws:
DrmaaException - Maybe be one of the following:
  • ConflictingAttributeValuesException

getJoinFiles

public boolean getJoinFiles()
Gets whether the error stream should be intermixed with the output stream. If true is specified the underlying DRM system will ignore the value of the errorPath attribute and intermix the standard error stream with the standard output stream as specified with outputPath.

Returns:
Whether the error stream should be intermixed with the output stream

setTransferFiles

public void setTransferFiles(FileTransferMode mode)
                      throws DrmaaException
Sets how to transfer files between hosts. The FileTransferMode's properties will be used to determine which files to transfer.
If the FileTransferMode object's errorStream property is set to true, the errorPath attribute is taken to specify the location to which error files should be transfered after the job finishes.
If the FileTransferMode object's inputStream property is set to true, the inputPath attribute is taken to specify the location from which input files should be transfered before the job starts.
If the FileTransferMode object's outputStream property is set to true, the outputPath attribute is taken to specify the location to which output files should be transfered after the job finishes.

Parameters:
mode - How to transfer files between hosts.
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeValueException
  • ConflictingAttributeValuesException

getTransferFiles

public FileTransferMode getTransferFiles()
Gets how to transfer files between hosts. If the FileTransferMode object's errorStream property is set to true, the errorPath attribute is taken to specify the location to which error files should be transfered after the job finishes.
If the FileTransferMode object's inputStream property is set to true, the inputPath attribute is taken to specify the location from which input files should be transfered before the job starts.
If the FileTransferMode object's outputStream property is set to true, the outputPath attribute is taken to specify the location to which output files should be transfered after the job finishes.

Returns:
How to transfer files between hosts.

setDeadlineTime

public void setDeadlineTime(PartialTimestamp deadline)
                     throws DrmaaException
Sets a deadline after which the DRMS will terminate the job.

Parameters:
deadline - The deadline after which the DRMS will terminate the job
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeValueException
  • InvalidArgumentException
  • ConflictingAttributeValuesException

getDeadlineTime

public PartialTimestamp getDeadlineTime()
Sets a deadline after which the DRMS will terminate the job.

Returns:
The deadline after which the DRMS will terminate the job

setHardWallclockTimeLimit

public void setHardWallclockTimeLimit(long hardWallclockLimit)
                               throws DrmaaException
Sets 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.

Parameters:
hardWallclockLimit - When the job's wall clock time limit has been exceeded. Specified in seconds
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeValueException
  • ConflictingAttributeValuesException

getHardWallclockTimeLimit

public long getHardWallclockTimeLimit()
Gets the duration of the job's wall clock time limit. The DRMS will terminate a job that has exceeded its wall clock time limit. Note that time spent suspended is also accounted for here.

Returns:
When the job's wall clock time limit has been exceeded. Specified in seconds

setSoftWallclockTimeLimit

public void setSoftWallclockTimeLimit(long softWallclockLimit)
                               throws DrmaaException
Sets 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.

Parameters:
softWallclockLimit - An estimate as to how much wall clock time job will need to complete. Specified in seconds
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeValueException
  • ConflictingAttributeValuesException

getSoftWallclockTimeLimit

public long getSoftWallclockTimeLimit()
Gets 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.

Returns:
An estimate as to how much wall clock time job will need to complete. Specified in seconds

setHardRunDurationLimit

public void setHardRunDurationLimit(long hardRunLimit)
                             throws DrmaaException
Sets how long the job may be in a running state before its limit has been exceeded, and therefore is terminated by the DRMS.

Parameters:
hardRunLimit - How long the job may be in a running state before its limit has been exceeded. Specified in seconds
Throws:
DrmaaException - Maybe be one of the following:
  • InvalidAttributeValueException
  • ConflictingAttributeValuesException

getHardRunDurationLimit

public long getHardRunDurationLimit()
Gets how long the job may be in a running state before its limit has been exceeded, and therefore is terminated by the DRMS.

Returns:
How long the job may be in a running state before its limit has been exceeded. Specified in seconds

setSoftRunDurationLimit

public void setSoftRunDurationLimit(long softRunLimit)
                             throws DrmaaException
Sets 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.

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 - Maybe be one of the following:
  • InvalidAttributeValueException
  • ConflictingAttributeValuesException

getSoftRunDurationLimit

public long getSoftRunDurationLimit()
Gets 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.

Returns:
An estimate as to how long the job will need to remain in a running state to complete. Specified in seconds

getAttributeNames

public java.util.List getAttributeNames()
Returns the list of supported property names. This list includes supported DRMAA reserved property names (both required and optional) and DRM-specific property names.

Returns:
the list of supported property names

getOptionalAttributeNames

protected java.util.List getOptionalAttributeNames()
This method returns the names of all optional and implementation-specific properties supported by this DRMAA implementation. Unless overridden by the DRMAA implementation, this method returns an empty list. This method is used by the getAttributeNames() method to construct the full list of implementation-supported property names.

Returns:
The names of all optional and implementation-specific properties supported by this DRMAA implementation
See Also:
getAttributeNames()

toString

public java.lang.String toString()
Converts this JobTemplate into a String which contains all property settings.

Returns:
a string containing all property settings