Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.grid.drmaa
Class JobTemplateImpl

    java.lang.Object
      org.ggf.drmaa.JobTemplate
          com.sun.grid.drmaa.JobTemplateImpl

public class JobTemplateImpl
extends JobTemplate

This class represents a remote job and its attributes. It is used to set up the environment for a job to be submitted.

### DRMMA Attributes

DRMAA job template attributes can be set from six different sources. In order of precedence, from lowest to highest, there are: options set by DRMAA automatically by default, options set in the sge_request file, options set in the script file, options set by the jobCategory property, options set by the nativeSpecification property, and options set through other DRMAA attributes.

By default DRMAA sets four options for all jobs. They are "-w e", "-p 0", "-b yes", and "-shell no". This means that by default, unschedulable jobs cannot be submitted, all jobs will have priority 0, all jobs will be treated as binary, i.e. no scripts args will be parsed, and all jobs will be executed without a wrapper shell.

The sge_request file, found in the $SGE_ROOT/$SGE_CELL/common directory, may contain options to be applied to all jobs. See the sge_request(5) man page for more information.

If the sge_request file contains "-b no" or if the nativeSpecification attribute is set and contains "-b no", the script file will be parsed for in-line arguments. Otherwise, no scripts args will be interpreted. See the qsub(1) man page for more information.

If the jobCategory attribute is set, and the category it points to exists in one of the qtask files, the options associated with that category will be applied to the job template. See the qtask(5) man page and the jobCategory attribute accessors below for more information.

If the nativeSpecification attribute is set, all options contained therein will be applied to the job template. See the nativeSpecification accessors below for more information.

Other DRMAA attributes will override any previous settings. For example, if the sge_request file contains "-j y", but the joinFiles attribute is set to false, the ultimate result is that the input and output files will remain separate.

### Attribute Correlations

The following DRMAA attributes correspond to the following qsub options:

DRMAA Attribute | qsub Option
--- | ---
remoteCommand | script file
args | script file arguments
jobSubmissionState = HOLD | -h
jobEnvironment | -v
workingDirectory | NONE
jobCategory | NONE
nativeSpecification | NONE
emailAddresses | -M
blockEmail = true | -m n
startTime | -a
jobName | -N
inputPath | -i
outputPath | -o
errorPath | -e
joinFiles | -j
transferFiles | NONE

The following attributes are unsupported by Grid Engine:

- deadlineTime
- hardWallclockTimeLimit
- softWallclockTimeLimit
- hardRunDurationTimeLimit
- softRunDurationTimeLimit

Using the accessors for any of these attributes will result in an UnsupportedAttributeException being thrown.

Since:
  0.5
Author:
  dan.templeton@sun.com
See Also:
  `JobTemplate`, `Session`, `SessionImpl`

Field Summary

Fields inherited from class org.ggf.drmaa.JobTemplate
`args, blockEmail, category, email, env, errorPath, HOME_DIRECTORY, inputPath, join, name, outputPath, PARAMETRIC_INDEX, remoteCommand, spec, startTime, state, wd`

Method Summary
`boolean` | `equals(java.lang.Object obj)` Tests whether this JobTemplateImpl represents the same job template as the given object.
`java.lang.String[]` | `getArgs()` Get The parameters passed as arguments to the job.
`java.util.List` | `getAttributeNames()` Returns the list of supported properties names.
`boolean` | `getBlockEmail()` Get whether to block sending e-mail by default, regardless of the DRMS settings.
`java.lang.String[]` | `getEmailAddresses()` 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.
`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.
`java.lang.String` | `getOutputPath()` Gets how to direct the job's standard output.
`java.lang.String` | `getRemoteCommand()` Get the command to execute as the job.
`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 name where the job will be executed.
`int` | `hashCode()` Returns a hash code based on the id used to associate this JobTemplateImpl with its native peer.
`void` | `setArgs(java.lang.String[] args)` Set the parameters passed as arguments to the job.
`void` | `setBlockEmail(boolean blockEmail)` Specifies whether e-mail sending shall blocked or not.
`void` | `setEmailAddresses(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` | `setInputPath(java.lang.String inputPath)` Set the job's standard input path.
`void` | `setJobCategory(java.lang.String category)` Specifies the DRMAA job category.
`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)` Specifies 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)` Specifies native qsub options which will be interpreted as part of the DRMAA job template.
`void` | `setOutputPath(java.lang.String outputPath)` Sets how to direct the job's standard output.
`void` | `setRemoteCommand(java.lang.String remoteCommand)` Specifies the remote command to execute.
`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)` Specifies the directory name where the job will be executed.

Methods inherited from class org.ggf.drmaa.JobTemplate
`getDeadlineTime, getEmail, getHardRunDurationLimit, getHardWallclockTimeLimit, getOptionalAttributeNames, getSoftRunDurationLimit, getSoftWallclockTimeLimit, setDeadlineTime, setEmail, setHardRunDurationLimit, setHardWallclockTimeLimit, setSoftRunDurationLimit, setSoftWallclockTimeLimit, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Method Detail

### setRemoteCommand

    public void setRemoteCommand(java.lang.String remoteCommand)
                          throws DrmaaException

  Specifies the remote command to execute. The remoteCommand must be the path of an executable that is available at the job's execution host. If the path is relative, it is assumed to be relative to the working directory set through the workingDirectory attibute. If workingDirectory is not set, the path is assumed to be relative to the user's home directory.

  The file pointed to by remoteCommand may either be an executable binary or an executable script. If a script, the script must include the path to the shell in a #! line at the beginning of the script. By default, the remote command will be executed directly, as by exec. (See the exec(2) man page.) To have the remote command executed in a shell, such as to preserve environment settings, use the nativeSpecification attribute to include the "-shell yes" option. Jobs which are executed by a wrapper shell fail differently from jobs which are executed directly. A job executed by a wrapper shell which contains a user error, such as an invalid path to the executable, will execute successfully and exit with a return code of 1. A job executed directly which contains such an error will enter the `FAILED` state upon execution.

  No binary file management is done.

  Overrides:
    `setRemoteCommand` in class `JobTemplate`
  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 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.

  Overrides:
    `getRemoteCommand` in class `JobTemplate`
  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.

  Overrides:
    `setArgs` in class `JobTemplate`
  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.

  Overrides:
    `getArgs` in class `JobTemplate`
  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

  Specifies the job state at submission. The possible values are `HOLD` and `ACTIVE`:

  `ACTIVE` means the job is runnable.

  `HOLD` means the job is submitted in user hold state (either `Session.USER_ON_HOLD` or `Session.USER_SYSTEM_ON_HOLD`). This is equivalent to the qsub submit option `-h'.

  Overrides:
    `setJobSubmissionState` in class `JobTemplate`
  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 the job is runnable.

  `HOLD` means the job is submitted in user hold state.

  Overrides:
    `getJobSubmissionState` in class `JobTemplate`
  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.

  Overrides:
    `setJobEnvironment` in class `JobTemplate`
  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.

  Overrides:
    `getJobEnvironment` in class `JobTemplate`
  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

  Specifies the directory name where the job will be 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' indices.

  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 recommended. If set to a relative path and no placeholder is used, a path relative to the user's home directory is assumed. If not set, the working directory will default to the user's home directory. If the directory does not exist when the job is run, the job enters the state `FAILED`.

  Overrides:
    `setWorkingDirectory` in class `JobTemplate`
  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 name where the job will be 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 must be specified in a syntax that is common at the host where the job will be executed. If set to a relative path and no placeholder is used, a path relative to the user's home directory is assumed.

  Overrides:
    `getWorkingDirectory` in class `JobTemplate`
  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

  Specifies the DRMAA job category. The category string is used by the underlying DRM as reference into the qtask file. Certain qsub options used in the referenced qtask file line are applied to the job template before submission to allow site-specific resolving of resources and/or policies. The cluster qtask file, the local qtask file, and the user qtask file are searched. See the qtask(5) man page. Job settings resulting from job template category are overridden by settings resulting from the job template nativeSpecification attribute as well as by explict DRMAA job template settings.

  The options -help, -t, -verify, and -w w|v are ignored. The -cwd option is ignored unless the $SGE_DRMAA_ALLOW_CWD environment variable is set.

  Overrides:
    `setJobCategory` in class `JobTemplate`
  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.

  Overrides:
    `getJobCategory` in class `JobTemplate`
  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

  Specifies native qsub options which will be interpreted as part of the DRMAA job template. All options available to the qsub command may be used in the nativeSpecification, except for -help, -t, -verify, and -w w|v. -cwd may only be used if the $SGE_DRMAA_ALLOW_CWD enviroment variable is set. Options set in the nativeSpecification will be overridden by the corresponding DRMAA attributes. See the qsub(1) man page for more information on qsub command line options.

  Overrides:
    `setNativeSpecification` in class `JobTemplate`
  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.

  Overrides:
    `getNativeSpecification` in class `JobTemplate`
  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

### setEmailAddresses

    public void setEmailAddresses(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

### getEmailAddresses

    public java.lang.String[] getEmailAddresses()

  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

  Specifies whether e-mail sending shall blocked or not. By default email is not sent. If, however, a setting in a cluster or user settings file or the nativeSpecification or jobCategory attribute enables sending email in association with job events, the blockEmail attribute will override that setting, causing no email to be sent.

  Overrides:
    `setBlockEmail` in class `JobTemplate`
  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.

  Overrides:
    `getBlockEmail` in class `JobTemplate`
  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.

  Overrides:
    `setStartTime` in class `JobTemplate`
  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.

  Overrides:
    `getStartTime` in class `JobTemplate`
  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. Setting the job name is equivalent to use of the qsub submit option `-N' with name as option argument and has the same restrictions. See the qsub(1) man page.

  Overrides:
    `setJobName` in class `JobTemplate`
  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.

  Overrides:
    `getJobName` in class `JobTemplate`
  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 TranferFileMode object's inputStream property is set to `true`, 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 TranferFileMode object's inputStream property is not set or is set to `false`, the input file is always expected at the host where the job is executed irrespectively of any hostname specified.
  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 attribute is set, and the file can't be read, the job will enter the state `FAILED`.

  Overrides:
    `setInputPath` in class `JobTemplate`
  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 TranferFileMode object's inputStream property is set to `true`, 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 TranferFileMode object's inputStream property is not set or is set to `false`, the input file is always expected at the host where the job is executed irrespectively of any hostname specified.
  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 is specified in a syntax that is common at the host where the file is located.

  Overrides:
    `getInputPath` in class `JobTemplate`
  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 TranferFileMode object's outputStream property is set to `true`, the output 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 job template attribute is not set or does not contain TRANSFER_OUTPUT_FILES, the output file is always expected at the host where the job is executed irrespectively of any hostname specified.
  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 attribute is set, and the file can't be written before execution the job will enter the state `FAILED`.

  Overrides:
    `setOutputPath` in class `JobTemplate`
  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 tranferFiles job template attribute is set to TRANSFER_OUTPUT_FILES, the output 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 TranferFileMode object's outputStream property is not set or is set to `false`, the output file is always expected at the host where the job is executed irrespectively of any hostname specified.
  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 is specified in a syntax that is common at the host where the file is located.

  Overrides:
    `getOutputPath` in class `JobTemplate`
  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 TranferFileMode object's errorStream property is set to `true`, the error 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 job template attribute is not set or does not contain TRANSFER_ERROR_FILES, the error file is always expected at the host where the job is executed irrespectively of any hostname specified.
  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 attribute is set, and the file can't be written before execution the job will enter the state `FAILED`.

  Overrides:
    `setErrorPath` in class `JobTemplate`
  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 TRANSFER_FILES job template attribute is supported and contains the character 'e', 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 TranferFileMode object's inputStream property is not set or is set to `false`, the error file is always kept at the host where the job is executed irrespectively of a possibly hostname specified.
  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.

  Overrides:
    `getErrorPath` in class `JobTemplate`
  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 the attribute defaults to false.
  If true, 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.

  Overrides:
    `setJoinFiles` in class `JobTemplate`
  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, 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.

  Overrides:
    `getJoinFiles` in class `JobTemplate`
  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. 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.

  See setInputPath(), setOutputPath() and setErrorPath() for information about how to specify the standard input file, standard output file and standard error file.

  The file transfer mechanism itself must be configured by the administrator. (see the sge_conf(5) man page.) When it is configured, the administrator has to enable transferFiles by settings the execd param, delegated_file_staging, to true. If it is not configured, transferFiles is not enabled and accessing this property will result in an UnsupportedAttributeException being thrown.

  Overrides:
    `setTransferFiles` in class `JobTemplate`
  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.

  Overrides:
    `getTransferFiles` in class `JobTemplate`
  Returns:
    How to transfer files between hosts. May be TRANSFER_NONE, or a combination of TRANSFER_ERROR_FILES, TRANSFER_INPUT_FILES and/or TRANSFER_OUTPUT_FILES ored together

### getAttributeNames

    public java.util.List getAttributeNames()

  Returns the list of supported properties names. With the execd param, delegated_file_staging set to false, this list includes only the list of DRMAA required properties. With delegated_file_staging set to true, the list also includes the transferFiles property.

  Overrides:
    `getAttributeNames` in class `JobTemplate`
  Returns:
    the list of supported attribute names

### equals

    public boolean equals(java.lang.Object obj)

  Tests whether this JobTemplateImpl represents the same job template as the given object. This means that even if two JobTemplateImpl's have all the same settings, they are not equal. This is because the JobTemplateImpl has a native peer.

  Parameters:
    `obj` - the object against which to compare
  Returns:
    whether the the given object is the same as this object

### hashCode

    public int hashCode()

  Returns a hash code based on the id used to associate this JobTemplateImpl with its native peer.

  Returns:
    the has code

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD