cct.grid
Class JobDescription

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by cct.grid.JobDescription
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class JobDescription
extends java.util.HashMap

Title: Molecular Structure Viewer/Editor

Description: Computational Chemistry Toolkit

Copyright: Copyright (c) 2006

Company: ANU

See Also:
Serialized Form

Field Summary
(package private) static java.lang.String ABS_PATH_EXECUTABLE
           
(package private) static java.lang.String ADDRESS
           
(package private) static java.lang.String ALLLORNONE
           
(package private) static java.lang.String ARGUMENT
           
(package private) static java.lang.String CLUSTER_ADDRESS
           
(package private) static java.lang.String COUNT
           
(package private) static java.lang.String DESTINATION_URL
           
(package private) static java.lang.String DIRECTORY
           
(package private) static java.lang.String ENVIRONMENT
           
(package private) static java.lang.String EXECUTABLE
           
(package private) static java.lang.String EXTENSIONS
           
(package private) static java.lang.String FACTORYENDPOINT
           
(package private) static java.lang.String FILECLEANUP
           
(package private) static java.lang.String FILESTAGEIN
           
(package private) static java.lang.String FILESTAGEOUT
           
(package private) static java.lang.String HOSTCOUNT
           
(package private) static java.lang.String JOB
           
(package private) static java.lang.String JOBCREDENTIAL
           
(package private) static java.lang.String JOBFS
           
(package private) static java.lang.String JOBTYPE
           
(package private) static java.lang.String LIBRARYPATH
           
(package private) static java.lang.String LOCAL_DIRECTORY
           
(package private) static java.lang.String LOCAL_EXECUTABLE
           
(package private) static java.lang.String MAXCPUTIME
           
(package private) static java.lang.String MAXMEMORY
           
(package private) static java.lang.String MAXTIME
           
(package private) static java.lang.String MAXWALLTIME
           
(package private) static java.lang.String MINMEMORY
           
(package private) static java.lang.String MULTIJOB
           
(package private) static java.lang.String PBS_JOB_SCRIPT
           
(package private) static java.lang.String PBS_OTHER
           
static java.lang.String PBS_SCHEDULER
           
(package private) static java.lang.String POSTPROCESS_DIRECTIVES
           
(package private) static java.lang.String PREPROCESS_DIRECTIVES
           
(package private) static java.lang.String PROJECT
           
(package private) static java.lang.String PROVIDER_OBJECT
           
(package private) static java.lang.String QUEUE
           
(package private) static java.lang.String RESOURCE_ID
           
(package private) static java.lang.String SERVICE_PROVIDER
           
(package private) static java.lang.String SERVICELEVEL
           
(package private) static java.lang.String SHELL
           
(package private) static java.lang.String SOFTWARE
           
(package private) static java.lang.String SOURCE_URL
           
(package private) static java.lang.String STAGINGCREDENTIAL
           
(package private) static java.lang.String STDERR
           
(package private) static java.lang.String STDIN
           
(package private) static java.lang.String STDOUT
           
(package private) static java.lang.String TRANSFER
           
(package private) static java.lang.String transferPrefix
           
(package private) static java.lang.String USE_GASS
           
 
Constructor Summary
JobDescription()
           
 
Method Summary
 void addArgument(java.lang.String argument)
          Adds argument for the executable
 void addPreprocessDirective(java.lang.String argument)
           
static java.lang.String createRunScript(GridProviderInterface provider, SchedulerInterface scheduler, ClientProgramInterface program)
           
static java.lang.String createUnixScript(JobDescription job)
           
static java.lang.String createUnixScript(JobDescription job, SchedulerInterface scheduler)
           
 void enableGASS(boolean enable)
           
 java.lang.String getArgument(int n)
          Returns n-th argument
 int getArgumentCount()
          Returns number of arguments
 java.lang.String getClusterAddress()
           
 java.lang.String getExecutable()
           
 java.lang.String[] getFileStageIn(int n)
          Returns source and destination files
 int getFileStageInCount()
          Returns number of files for staging in
 int getJobFS()
           
 java.lang.String getJobName()
           
 java.lang.String getLocalDirectory()
           
 float getMaxCpuTime()
           
 int getMaxMemory()
           
 float getMaxTime()
           
 int getMaxWallTime()
           
 java.lang.String getMaxWallTimeFormatted()
          Returns time in the format [[hours:]minutes:]seconds
 int getNCPU()
           
 java.lang.String getPBSOther()
           
 java.lang.String getPreprocessDir(int n)
           
 int getPreprocessDirCount()
          Returns number of preprocess directives
 java.lang.String getProject()
           
 java.lang.String getQueue()
           
 java.lang.String getRemoteDirectory()
           
 java.lang.String getRemoteHost()
           
 java.lang.String getScheduler()
           
 java.lang.String getShell()
           
 java.lang.String getSoftware()
           
 java.lang.String getStderr()
           
 java.lang.String getStdout()
           
 java.lang.String getTaskProvider()
           
 java.lang.Object getTaskProviderObject()
           
 boolean isAbsPathExecutable()
           
 boolean isGASSEnabled()
           
 boolean isLocalExecutable()
           
 boolean isPbsJobScript()
           
 void setAbsPathExecutable(boolean local)
           
 void setClusterAddress(java.lang.String host)
           
 void setExecutable(java.lang.String executable)
           
 void setFileStageIn(java.lang.String source, java.lang.String destination)
           
 void setFileStageOut(java.lang.String source, java.lang.String destination)
           
 void setJobFS(int jobfs)
           
 void setJobName(java.lang.String dir)
           
 void setLocalDirectory(java.lang.String dir)
           
 void setLocalExecutable(boolean local)
           
 void setMaxCpuTime(float time)
           
 void setMaxMemory(int mem)
          Memory is in MB
 void setMaxTime(float time)
           
 void setMaxWallTime(float time)
          Time is in seconds
 void setMaxWallTime(int time)
          Time is in seconds
 void setNCPU(int ncpu)
           
 void setPbsJobScript(boolean enable)
           
 void setPBSOther(java.lang.String other)
           
 void setProject(java.lang.String proj)
           
 void setQueue(java.lang.String dir)
           
 void setRemoteDirectory(java.lang.String dir)
           
 void setRemoteHost(java.lang.String host)
           
 void setScheduler(java.lang.String scheduler)
           
 void setShell(java.lang.String other)
           
 void setSoftware(java.lang.String soft)
           
 void setStderr(java.lang.String dir)
           
 void setStdout(java.lang.String dir)
           
 void setTaskProvider(java.lang.String provider)
           
 void setTaskProviderObject(java.lang.Object provider)
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

transferPrefix

static final java.lang.String transferPrefix
See Also:
Constant Field Values

PREPROCESS_DIRECTIVES

static final java.lang.String PREPROCESS_DIRECTIVES
See Also:
Constant Field Values

POSTPROCESS_DIRECTIVES

static final java.lang.String POSTPROCESS_DIRECTIVES
See Also:
Constant Field Values

SERVICE_PROVIDER

static final java.lang.String SERVICE_PROVIDER
See Also:
Constant Field Values

LOCAL_DIRECTORY

static final java.lang.String LOCAL_DIRECTORY
See Also:
Constant Field Values

LOCAL_EXECUTABLE

static final java.lang.String LOCAL_EXECUTABLE
See Also:
Constant Field Values

ABS_PATH_EXECUTABLE

static final java.lang.String ABS_PATH_EXECUTABLE
See Also:
Constant Field Values

JOBFS

static final java.lang.String JOBFS
See Also:
Constant Field Values

SOFTWARE

static final java.lang.String SOFTWARE
See Also:
Constant Field Values

PROVIDER_OBJECT

static final java.lang.String PROVIDER_OBJECT
See Also:
Constant Field Values

PBS_SCHEDULER

public static final java.lang.String PBS_SCHEDULER
See Also:
Constant Field Values

ARGUMENT

static final java.lang.String ARGUMENT
See Also:
Constant Field Values

COUNT

static final java.lang.String COUNT
See Also:
Constant Field Values

DIRECTORY

static final java.lang.String DIRECTORY
See Also:
Constant Field Values

ENVIRONMENT

static final java.lang.String ENVIRONMENT
See Also:
Constant Field Values

EXECUTABLE

static final java.lang.String EXECUTABLE
See Also:
Constant Field Values

EXTENSIONS

static final java.lang.String EXTENSIONS
See Also:
Constant Field Values

FACTORYENDPOINT

static final java.lang.String FACTORYENDPOINT
See Also:
Constant Field Values

FILECLEANUP

static final java.lang.String FILECLEANUP
See Also:
Constant Field Values

FILESTAGEIN

static final java.lang.String FILESTAGEIN
See Also:
Constant Field Values

FILESTAGEOUT

static final java.lang.String FILESTAGEOUT
See Also:
Constant Field Values

HOSTCOUNT

static final java.lang.String HOSTCOUNT
See Also:
Constant Field Values

JOB

static final java.lang.String JOB
See Also:
Constant Field Values

JOBCREDENTIAL

static final java.lang.String JOBCREDENTIAL
See Also:
Constant Field Values

JOBTYPE

static final java.lang.String JOBTYPE
See Also:
Constant Field Values

LIBRARYPATH

static final java.lang.String LIBRARYPATH
See Also:
Constant Field Values

MAXCPUTIME

static final java.lang.String MAXCPUTIME
See Also:
Constant Field Values

MAXMEMORY

static final java.lang.String MAXMEMORY
See Also:
Constant Field Values

MAXTIME

static final java.lang.String MAXTIME
See Also:
Constant Field Values

MAXWALLTIME

static final java.lang.String MAXWALLTIME
See Also:
Constant Field Values

MINMEMORY

static final java.lang.String MINMEMORY
See Also:
Constant Field Values

MULTIJOB

static final java.lang.String MULTIJOB
See Also:
Constant Field Values

PROJECT

static final java.lang.String PROJECT
See Also:
Constant Field Values

QUEUE

static final java.lang.String QUEUE
See Also:
Constant Field Values

SERVICELEVEL

static final java.lang.String SERVICELEVEL
See Also:
Constant Field Values

STAGINGCREDENTIAL

static final java.lang.String STAGINGCREDENTIAL
See Also:
Constant Field Values

STDERR

static final java.lang.String STDERR
See Also:
Constant Field Values

STDIN

static final java.lang.String STDIN
See Also:
Constant Field Values

STDOUT

static final java.lang.String STDOUT
See Also:
Constant Field Values

RESOURCE_ID

static final java.lang.String RESOURCE_ID
See Also:
Constant Field Values

ADDRESS

static final java.lang.String ADDRESS
See Also:
Constant Field Values

CLUSTER_ADDRESS

static final java.lang.String CLUSTER_ADDRESS
See Also:
Constant Field Values

SHELL

static final java.lang.String SHELL
See Also:
Constant Field Values

ALLLORNONE

static final java.lang.String ALLLORNONE
See Also:
Constant Field Values

SOURCE_URL

static final java.lang.String SOURCE_URL
See Also:
Constant Field Values

DESTINATION_URL

static final java.lang.String DESTINATION_URL
See Also:
Constant Field Values

USE_GASS

static final java.lang.String USE_GASS
See Also:
Constant Field Values

PBS_JOB_SCRIPT

static final java.lang.String PBS_JOB_SCRIPT
See Also:
Constant Field Values

PBS_OTHER

static final java.lang.String PBS_OTHER
See Also:
Constant Field Values

TRANSFER

static final java.lang.String TRANSFER
See Also:
Constant Field Values
Constructor Detail

JobDescription

public JobDescription()
Method Detail

setExecutable

public void setExecutable(java.lang.String executable)

getExecutable

public java.lang.String getExecutable()

setPBSOther

public void setPBSOther(java.lang.String other)

getShell

public java.lang.String getShell()

setShell

public void setShell(java.lang.String other)

getPBSOther

public java.lang.String getPBSOther()

setPbsJobScript

public void setPbsJobScript(boolean enable)

isPbsJobScript

public boolean isPbsJobScript()

setTaskProvider

public void setTaskProvider(java.lang.String provider)

getTaskProvider

public java.lang.String getTaskProvider()

setTaskProviderObject

public void setTaskProviderObject(java.lang.Object provider)

getTaskProviderObject

public java.lang.Object getTaskProviderObject()

setRemoteDirectory

public void setRemoteDirectory(java.lang.String dir)

getRemoteDirectory

public java.lang.String getRemoteDirectory()

setStdout

public void setStdout(java.lang.String dir)

getStdout

public java.lang.String getStdout()

setStderr

public void setStderr(java.lang.String dir)

getStderr

public java.lang.String getStderr()

setJobName

public void setJobName(java.lang.String dir)

getJobName

public java.lang.String getJobName()

setQueue

public void setQueue(java.lang.String dir)

getQueue

public java.lang.String getQueue()

setLocalDirectory

public void setLocalDirectory(java.lang.String dir)

getLocalDirectory

public java.lang.String getLocalDirectory()

setNCPU

public void setNCPU(int ncpu)

getNCPU

public int getNCPU()

setMaxWallTime

public void setMaxWallTime(float time)
Time is in seconds

Parameters:
time - float

setMaxWallTime

public void setMaxWallTime(int time)
Time is in seconds

Parameters:
time - float

getMaxWallTime

public int getMaxWallTime()

getMaxWallTimeFormatted

public java.lang.String getMaxWallTimeFormatted()
Returns time in the format [[hours:]minutes:]seconds

Returns:
String

setMaxCpuTime

public void setMaxCpuTime(float time)

getMaxCpuTime

public float getMaxCpuTime()

setMaxTime

public void setMaxTime(float time)

getMaxTime

public float getMaxTime()

setMaxMemory

public void setMaxMemory(int mem)
Memory is in MB

Parameters:
mem - int

getMaxMemory

public int getMaxMemory()

setProject

public void setProject(java.lang.String proj)

getProject

public java.lang.String getProject()

setJobFS

public void setJobFS(int jobfs)

getJobFS

public int getJobFS()

setSoftware

public void setSoftware(java.lang.String soft)

getSoftware

public java.lang.String getSoftware()

setFileStageIn

public void setFileStageIn(java.lang.String source,
                           java.lang.String destination)
Parameters:
source - String - Remote file
destination - String - Local file

setFileStageOut

public void setFileStageOut(java.lang.String source,
                            java.lang.String destination)
Parameters:
source - String - Local file
destination - String - Remote file

setScheduler

public void setScheduler(java.lang.String scheduler)

getScheduler

public java.lang.String getScheduler()

setRemoteHost

public void setRemoteHost(java.lang.String host)

setClusterAddress

public void setClusterAddress(java.lang.String host)

getRemoteHost

public java.lang.String getRemoteHost()

getClusterAddress

public java.lang.String getClusterAddress()

enableGASS

public void enableGASS(boolean enable)

isGASSEnabled

public boolean isGASSEnabled()

getFileStageInCount

public int getFileStageInCount()
Returns number of files for staging in

Returns:
int - number of files for staging in

getFileStageIn

public java.lang.String[] getFileStageIn(int n)
Returns source and destination files

Parameters:
n - int - 0 <= n < getFileStageInCount()
Returns:
String[] - index 0 - destination file (remote) index 1 - source file (local)

addArgument

public void addArgument(java.lang.String argument)
Adds argument for the executable

Parameters:
argument - String

getArgumentCount

public int getArgumentCount()
Returns number of arguments

Returns:
int

getArgument

public java.lang.String getArgument(int n)
Returns n-th argument

Parameters:
n - int
Returns:
String

setLocalExecutable

public void setLocalExecutable(boolean local)

setAbsPathExecutable

public void setAbsPathExecutable(boolean local)

isAbsPathExecutable

public boolean isAbsPathExecutable()

isLocalExecutable

public boolean isLocalExecutable()

addPreprocessDirective

public void addPreprocessDirective(java.lang.String argument)

getPreprocessDirCount

public int getPreprocessDirCount()
Returns number of preprocess directives

Returns:
int

getPreprocessDir

public java.lang.String getPreprocessDir(int n)

createRunScript

public static java.lang.String createRunScript(GridProviderInterface provider,
                                               SchedulerInterface scheduler,
                                               ClientProgramInterface program)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

createUnixScript

public static java.lang.String createUnixScript(JobDescription job,
                                                SchedulerInterface scheduler)
                                         throws java.lang.Exception
Parameters:
job - JobDescription
Throws:
java.lang.Exception

createUnixScript

public static java.lang.String createUnixScript(JobDescription job)
                                         throws java.lang.Exception
Throws:
java.lang.Exception