public class GramAttributes extends RslAttributes
atts.setStdout("$(MY_URL)/bar"); atts.addEnvVariable("MY_URL", "http://foo");the resulting rsl will look like:
&("stdout"="$(MY_URL)/hello")("environment"=("MY_URL" "http://foo"))Since the "$(MY_URL)/hello" is in double quotes it will be treated as a single string and the variable will never be resolved. The parser will set "stdout" to "$(MY_URL)/hello" instead of "http://foo/hello".
Modifier and Type | Field and Description |
---|---|
static int |
JOBTYPE_CONDOR |
static int |
JOBTYPE_MPI |
static int |
JOBTYPE_MULTIPLE |
static int |
JOBTYPE_SINGLE |
rslTree
Constructor and Description |
---|
GramAttributes()
Constructs a new, empty GramAttributes object.
|
GramAttributes(RslNode rslTree)
Constructs a new GramAttributes object initialized with
the specified RSL parse tree.
|
GramAttributes(String rsl)
Constructs a new GramAttributes object initialized with
the specified RSL string.
|
Modifier and Type | Method and Description |
---|---|
void |
addArgument(String argument)
Adds a single argument.
|
void |
addEnvVariable(String varName,
String value)
Adds an environment variable.
|
boolean |
deleteArgument(String argument)
Removes a specific argument from the argument list.
|
boolean |
deleteEnvVariable(String varName)
Removes a specific environment variable from the
environment list.
|
List |
getArguments()
Returns a list of arguments.
|
String |
getDirectory()
Return directory path
|
Map |
getEnvironment()
Returns a variable/value pair list of environment
variables.
|
String |
getExecutable()
Return executable name
|
int |
getJobType()
Returns type of the job.
|
int |
getMaxCPUTime()
Return the maximum cpu time limit set for the job
|
int |
getMaxMemory()
Return the maximum memory limit set for the job
|
int |
getMaxWallTime()
Return the maximum wall time limit set for the job
|
int |
getMinMemory()
Return the minimum memory limit set for the job
|
int |
getNumProcs()
Return the number of processors
|
String |
getProject()
Return the project name charged for this job
|
String |
getQueue()
Return the queue name used for this job
|
String |
getStderr()
Return the location used to redirect stderr on the submission machine
|
String |
getStdin()
Return the location used to redirect stdin on the submission machine
|
String |
getStdout()
Return the location used to redirect stdout on the submission machine
|
boolean |
isDryRun()
Checks if dryryn is enabled.
|
void |
setDirectory(String directory)
Specify the directory path the executable will be run in
|
void |
setDryRun(boolean enable)
Sets the dryrun parameter.
|
void |
setExecutable(String executable)
Specify the name of the executable to run
|
void |
setJobType(int jobType)
Sets a job type.
|
void |
setMaxCPUTime(int maxcputime)
Specify the maximum cpu time limit for this job
|
void |
setMaxMemory(int maxmemory)
Specify the maximum memory limit for this job
|
void |
setMaxWallTime(int maxwalltime)
Specify the maximum wall time limit for this job
|
void |
setMinMemory(int minmemory)
Specify the minimum memory limit for this job
|
void |
setNumProcs(int numprocs)
Specify the nuber of processors to be used by the current executable
|
void |
setProject(String project)
Specify the project to be charged for this job
|
void |
setQueue(String queue)
Specify the queue name to be used for this job
|
void |
setStderr(String stderr)
Specify the location to redirect stderr on the submission machine
|
void |
setStdin(String stdin)
Specify the location to redirect stdin on the submission machine
|
void |
setStdout(String stdout)
Specify the location to redirect stdout on the submission machine
|
add, addMulti, addVariable, get, getFirstValue, getMap, getMulti, getRelation, getRslNode, getSingle, getVariables, remove, remove, removeMap, removeVariable, set, setMulti, toRSL
public static final int JOBTYPE_SINGLE
public static final int JOBTYPE_MULTIPLE
public static final int JOBTYPE_MPI
public static final int JOBTYPE_CONDOR
public GramAttributes()
public GramAttributes(String rsl) throws ParseException
rsl
- the rsl string to initialize the class with.ParseException
- if the rsl cannot be parsed.public GramAttributes(RslNode rslTree)
rslTree
- the rsl parse tree to initialize the class with.public void setExecutable(String executable)
executable
- the name of the executablepublic String getExecutable()
public void setDirectory(String directory)
directory
- the directory path on the submission machinepublic String getDirectory()
public void setStdout(String stdout)
stdout
- the location to redirect stdout on the submission machinepublic String getStdout()
public void setStderr(String stderr)
stderr
- the location to redirect stderr on the submission machinepublic String getStderr()
public void setStdin(String stdin)
stdin
- the location to redirect stdin on the submission machinepublic String getStdin()
public void setDryRun(boolean enable)
enable
- true to enable dryrun, false otherwise.public boolean isDryRun()
public void setQueue(String queue)
queue
- the queue name to be used for this jobpublic String getQueue()
public void setProject(String project)
project
- the project to be charged for this jobpublic String getProject()
public void setJobType(int jobType)
jobType
- type of the job: One of the following:
SINGLE, MULTIPLE, MPI, or CONDOR.public int getJobType()
public void setMinMemory(int minmemory)
minmemory
- the minimum memory limit for this jobpublic int getMinMemory()
public void setNumProcs(int numprocs)
numprocs
- the number of processors to usepublic int getNumProcs()
public void setMaxWallTime(int maxwalltime)
maxwalltime
- the maximum wall time limit for this jobpublic int getMaxWallTime()
public void setMaxCPUTime(int maxcputime)
maxcputime
- the maximum cpu time limit for this jobpublic int getMaxCPUTime()
public void setMaxMemory(int maxmemory)
maxmemory
- the maximum memory limit for this jobpublic int getMaxMemory()
public void addArgument(String argument)
argument
- an argument to add.
It will be treated as a single argument.public boolean deleteArgument(String argument)
argument
- argument to remove.public List getArguments()
public void addEnvVariable(String varName, String value)
varName
- the variable name.value
- the value of the variable.public boolean deleteEnvVariable(String varName)
varName
- name of the variable to remove.public Map getEnvironment()
Copyright © 2016. All rights reserved.