public class JobDescription
extends java.lang.Object
Scheduler
.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_RUN_TIME
The default maximum run time
|
Constructor and Description |
---|
JobDescription()
Create a JobDescription.
|
JobDescription(JobDescription original)
Create a JobDescription by copying an existing one.
|
Modifier and Type | Method and Description |
---|---|
void |
addArgument(java.lang.String argument)
Add a command line argument for the executable.
|
void |
addEnvironment(java.lang.String key,
java.lang.String value)
Add a variable to the environment of the executable.
|
void |
addJobOption(java.lang.String key,
java.lang.String value)
Add a job option to the job.
|
boolean |
equals(java.lang.Object obj) |
java.util.List<java.lang.String> |
getArguments()
Get the command line arguments of the executable.
|
java.util.Map<java.lang.String,java.lang.String> |
getEnvironment()
Get the environment of the executable.
|
java.lang.String |
getExecutable()
Get the path to the executable.
|
java.util.Map<java.lang.String,java.lang.String> |
getJobOptions()
Get a copy of the job options of this job.
|
int |
getMaxTime()
Get the maximum job time (in minutes).
|
int |
getNodeCount()
Get the number of nodes.
|
int |
getProcessesPerNode()
Get the number of processes to start on each node.
|
java.lang.String |
getQueueName()
Get the queue name;
|
java.lang.String |
getStderr()
Gets the path to the file to which the executable must redirect stderr.
|
java.lang.String |
getStdin()
Gets the path to the file from which the executable must redirect stdin.
|
java.lang.String |
getStdout()
Gets the path to the file to which the executable must redirect stdout.
|
java.lang.String |
getWorkingDirectory()
Gets the path of the working directory for the executable.
|
int |
hashCode() |
boolean |
isInteractive()
Is this an interactive job ?
|
boolean |
isStartSingleProcess()
Is only a single process started?
|
void |
setArguments(java.lang.String... arguments)
Sets the command line arguments of the executable.
|
void |
setEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
Sets the environment of the executable.
|
void |
setExecutable(java.lang.String executable)
Sets the path to the executable.
|
void |
setInteractive(boolean interactive)
Set if this is an interactive job.
|
void |
setJobOptions(java.util.Map<java.lang.String,java.lang.String> options)
Sets the job options of the job.
|
void |
setMaxTime(int maxTime)
Set the maximum job time (in minutes).
|
void |
setNodeCount(int nodeCount)
Set the number of nodes.
|
void |
setProcessesPerNode(int processesPerNode)
Set the number of processes started on each node.
|
void |
setQueueName(java.lang.String queueName)
Set the queue name;
|
void |
setStartSingleProcess(boolean startSingleProcess)
Set if only a single process is started, instead of nodeCount * processesPerNode.
|
void |
setStderr(java.lang.String stderr)
Sets the path to the file to which the executable must redirect stderr.
|
void |
setStdin(java.lang.String stdin)
Sets the path to the file from which the executable must redirect stdin.
|
void |
setStdout(java.lang.String stdout)
Sets the path to the file to which the executable must redirect stdout.
|
void |
setWorkingDirectory(java.lang.String workingDirectory)
Sets the path of the working directory for the executable.
|
java.lang.String |
toString() |
public static final int DEFAULT_MAX_RUN_TIME
public JobDescription()
public JobDescription(JobDescription original)
original
- JobDescription to copypublic int getNodeCount()
public void setNodeCount(int nodeCount)
nodeCount
- the number of nodes;public int getProcessesPerNode()
public void setProcessesPerNode(int processesPerNode)
processesPerNode
- the number of processes started on each node.public boolean isStartSingleProcess()
public void setStartSingleProcess(boolean startSingleProcess)
startSingleProcess
- if only a single process is started.public java.lang.String getQueueName()
public void setQueueName(java.lang.String queueName)
queueName
- the queue name;public int getMaxTime()
public void setMaxTime(int maxTime)
maxTime
- the maximum job time (in minutes).public java.lang.String getExecutable()
public void setExecutable(java.lang.String executable)
executable
- the path to the executable.public java.util.List<java.lang.String> getArguments()
public void setArguments(java.lang.String... arguments)
arguments
- the command line arguments of the executable.public void addArgument(java.lang.String argument)
null
or empty.argument
- the command line argument to add.public java.util.Map<java.lang.String,java.lang.String> getEnvironment()
Map
of environment variables with their values (for example:
"JAVA_HOME", "/path/to/java").public void setEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
Map
of environment variables with their values (for example:
"JAVA_HOME", "/path/to/java").environment
- environment of the executable.public void addEnvironment(java.lang.String key, java.lang.String value)
Map
of environment variables with their values (for example:
"JAVA_HOME", "/path/to/java").
The key of an environment variable may not be null
or empty.key
- the unique key under which to store the value.value
- the value to store the value.public java.util.Map<java.lang.String,java.lang.String> getJobOptions()
Map
of options variables with their values (for example: "PE", "MPI").public void setJobOptions(java.util.Map<java.lang.String,java.lang.String> options)
Map
of options variables with their values (for example: "PE", "MPI").options
- job options of the job.public void addJobOption(java.lang.String key, java.lang.String value)
null
or empty.key
- the unique key under which to store the job option.value
- the value of the option to store.public void setStdin(java.lang.String stdin)
stdin
- the path.public void setStdout(java.lang.String stdout)
stdout
- the path.public void setStderr(java.lang.String stderr)
stderr
- the path.public void setWorkingDirectory(java.lang.String workingDirectory)
workingDirectory
- path of the working directory.public java.lang.String getStdin()
public java.lang.String getStdout()
public java.lang.String getStderr()
public java.lang.String getWorkingDirectory()
public boolean isInteractive()
public void setInteractive(boolean interactive)
interactive
- if this is an interactive job.public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object