public class JobDescription extends 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(String argument)
Add a command line argument for the executable.
|
void |
addEnvironment(String key,
String value)
Add a variable to the environment of the executable.
|
void |
addJobOption(String key,
String value)
Add a job option to the job.
|
boolean |
equals(Object obj) |
List<String> |
getArguments()
Get the command line arguments of the executable.
|
Map<String,String> |
getEnvironment()
Get the environment of the executable.
|
String |
getExecutable()
Get the path to the executable.
|
Map<String,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.
|
String |
getQueueName()
Get the queue name;
|
String |
getStderr()
Gets the path to the file to which the executable must redirect stderr.
|
String |
getStdin()
Gets the path to the file from which the executable must redirect stdin.
|
String |
getStdout()
Gets the path to the file to which the executable must redirect stdout.
|
String |
getWorkingDirectory()
Gets the path of the working directory for the executable.
|
int |
hashCode() |
boolean |
isInteractive()
Is this an interactive job ?
|
void |
setArguments(String... arguments)
Sets the command line arguments of the executable.
|
void |
setEnvironment(Map<String,String> environment)
Sets the environment of the executable.
|
void |
setExecutable(String executable)
Sets the path to the executable.
|
void |
setInteractive(boolean interactive)
Set if this is an interactive job.
|
void |
setJobOptions(Map<String,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(String queueName)
Set the queue name;
|
void |
setStderr(String stderr)
Sets the path to the file to which the executable must redirect stderr.
|
void |
setStdin(String stdin)
Sets the path to the file from which the executable must redirect stdin.
|
void |
setStdout(String stdout)
Sets the path to the file to which the executable must redirect stdout.
|
void |
setWorkingDirectory(String workingDirectory)
Sets the path of the working directory for the executable.
|
String |
toString() |
public static final int DEFAULT_MAX_RUN_TIME
public JobDescription()
public JobDescription(JobDescription original)
public 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 String getQueueName()
public void setQueueName(String queueName)
queueName
- the queue name;public int getMaxTime()
public void setMaxTime(int maxTime)
maxTime
- the maximum job time (in minutes).public String getExecutable()
public void setExecutable(String executable)
executable
- the path to the executable.public List<String> getArguments()
public void setArguments(String... arguments)
arguments
- the command line arguments of the executable.public void addArgument(String argument)
null
or empty.argument
- the command line argument to add.public Map<String,String> getEnvironment()
Map
of environment variables with their values (for example:
"JAVA_HOME", "/path/to/java").public void setEnvironment(Map<String,String> environment)
Map
of environment variables with their values (for example:
"JAVA_HOME", "/path/to/java").environment
- environment of the executable.public void addEnvironment(String key, 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 Map<String,String> getJobOptions()
Map
of options variables with their values (for example: "PE", "MPI").public void setJobOptions(Map<String,String> options)
Map
of options variables with their values (for example: "PE", "MPI").options
- job options of the job.public void addJobOption(String key, 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(String stdin)
stdin
- the path.public void setStdout(String stdout)
stdout
- the path.public void setStderr(String stderr)
stderr
- the path.public void setWorkingDirectory(String workingDirectory)
workingDirectory
- path of the working directory.public String getStdin()
public String getStdout()
public String getStderr()
public String getWorkingDirectory()
public boolean isInteractive()
public void setInteractive(boolean interactive)
interactive
- if this is an interactive job.