public class JobConfig
extends java.lang.Object
Constructor and Description |
---|
JobConfig()
An empty job configuration.
|
JobConfig(java.lang.String jobGroup,
java.lang.String jobName)
Job configuration with a job name and group.
|
Modifier and Type | Method and Description |
---|---|
void |
addSubmissionParameter(java.lang.String name,
boolean value) |
void |
addSubmissionParameter(java.lang.String name,
java.lang.Number value) |
void |
addSubmissionParameter(java.lang.String name,
java.lang.String value) |
JobConfig |
addToConfig(java.util.Map<java.lang.String,java.lang.Object> config) |
static JobConfig |
fromProperties(java.util.Map<java.lang.String,? extends java.lang.Object> config)
Create a
JobConfig from a configuration map. |
java.lang.String |
getDataDirectory()
Get the data directory.
|
java.lang.String |
getJobGroup()
Get the job group.
|
java.lang.String |
getJobName()
Get the job name.
|
java.lang.Boolean |
getOverrideResourceLoadProtection() |
java.lang.Boolean |
getPreloadApplicationBundles() |
java.lang.String |
getStreamsTracing() |
java.util.List<SubmissionParameter> |
getSubmissionParameters()
Get the submission parameters.
|
java.util.logging.Level |
getTracing() |
boolean |
hasSubmissionParameters()
Have any submission parameters been added.
|
void |
setDataDirectory(java.lang.String dataDirectory)
Set the data directory.
|
void |
setJobGroup(java.lang.String jobGroup)
Set the job group.
|
void |
setJobName(java.lang.String jobName)
Set the job name.
|
void |
setOverrideResourceLoadProtection(java.lang.Boolean overrideResourceLoadProtection) |
void |
setPreloadApplicationBundles(java.lang.Boolean preloadApplicationBundles) |
void |
setTracing(java.util.logging.Level tracing) |
public JobConfig()
public JobConfig(java.lang.String jobGroup, java.lang.String jobName)
jobName
- Job group, can be null
.jobGroup
- Job name, can be null
.public JobConfig addToConfig(java.util.Map<java.lang.String,java.lang.Object> config)
public java.lang.String getJobName()
null
if it is not set.public void setJobName(java.lang.String jobName)
jobName
- Job name, null
unsets the name.public java.lang.String getJobGroup()
null
if it is not set.public void setJobGroup(java.lang.String jobGroup)
jobGroup
- Job group, null
unsets the group.public java.lang.String getDataDirectory()
null
if it is not set.public void setDataDirectory(java.lang.String dataDirectory)
dataDirectory
- Data directory, null
unsets the data directory.public java.lang.Boolean getOverrideResourceLoadProtection()
public void setOverrideResourceLoadProtection(java.lang.Boolean overrideResourceLoadProtection)
public java.util.logging.Level getTracing()
public java.lang.String getStreamsTracing()
public void setTracing(java.util.logging.Level tracing)
tracing
- the tracing to setpublic java.lang.Boolean getPreloadApplicationBundles()
public void setPreloadApplicationBundles(java.lang.Boolean preloadApplicationBundles)
public boolean hasSubmissionParameters()
true
if at least one submission exists, otherwise false
.public java.util.List<SubmissionParameter> getSubmissionParameters()
public void addSubmissionParameter(java.lang.String name, boolean value)
public void addSubmissionParameter(java.lang.String name, java.lang.String value)
public void addSubmissionParameter(java.lang.String name, java.lang.Number value)
public static JobConfig fromProperties(java.util.Map<java.lang.String,? extends java.lang.Object> config)
JobConfig
from a configuration map.
If config
contains JobProperties.CONFIG
and
it is an instance of JobConfig
then it is returned.
JobConfig
object is created from other
JobProperties
in config
. If none exist then
an empty JobConfig
is returned.config
- Submission configuration.config
.JobProperties