@PublicAPI public abstract class Job extends CommonAttribute
Here's a definition of the different parts of a job:
setName(String)
will be used to identified the job.
setDescription(String)
to set a short description of your job.
setPriority(JobPriority)
to set the priority for the job, see JobPriority
for more details.
CommonAttribute.setOnTaskError(OnTaskError)
to set a predefined action when an exception occurred in at least one of the task.
Once the job created, you can submit it to the scheduler using the UserSchedulerInterface.
Modifier and Type | Field and Description |
---|---|
protected String |
description
Short description of this job
|
protected String |
globalSpace |
protected String |
inputSpace |
static String |
JOB_DDL |
static String |
JOB_EXEC_TIME |
protected String |
name
Name of the job
|
protected String |
outputSpace |
protected JobPriority |
priority
Job priority
|
protected String |
projectName
Project name for this job
|
protected Map<String,JobVariable> |
unresolvedVariables
A map to holds job descriptor variables with their values unresolved against other variables
|
protected String |
userSpace |
protected Map<String,JobVariable> |
variables
A map to holds job descriptor variables
|
protected String |
visualization
SVG Visualization rendering of this job
|
GENERIC_INFO_START_AT_KEY, genericInformation, maxNumberOfExecution, onTaskError, restartTaskOnError, unresolvedGenericInformation
Constructor and Description |
---|
Job()
ProActive Empty Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
display() |
String |
getDescription()
To get the description
|
String |
getGlobalSpace() |
abstract JobId |
getId()
To get the id
|
String |
getInputSpace()
Get the input Space
|
String |
getJobContent() |
Optional<JobDeadline> |
getJobDeadline()
Deadline can be as absolute or relative (from the job started time)
Absolute deadline can be set as GI vairable `JOB_DDL` in ISO8601 date format
without milliseconds, e.g.
|
Optional<Duration> |
getJobExpectedExecutionTime() |
String |
getName()
To get the name of the job.
|
String |
getOutputSpace()
Get the output Space
|
JobPriority |
getPriority()
To get the priority of the job.
|
String |
getProjectName()
Returns the project Name.
|
abstract JobType |
getType()
To get the type of this job
|
Map<String,JobVariable> |
getUnresolvedVariables()
Returns the unresolved variable map of this job.
|
String |
getUserSpace() |
Map<String,JobVariable> |
getVariables()
Returns the variable map of this job.
|
Map<String,String> |
getVariablesAsReplacementMap()
Returns a map containing the variable names and their values.
|
String |
getVisualization()
Get the job visualization rendering in SVG format
|
void |
setDescription(String description)
To set a short description for the job.
|
void |
setGlobalSpace(String globalSpace)
Set the global Space value to the given GLOBAL space string value
|
void |
setInputSpace(String inputSpace)
Set the input Space value to the given inputSpace value
|
void |
setJobContent(String jobContent) |
void |
setName(String name)
To set the name of the job.
|
void |
setOutputSpace(String outputSpace)
Set the output Space value to the given outputSpace value
|
void |
setPriority(JobPriority priority)
To set the priority of the job.
|
void |
setProjectName(String projectName)
Sets the project Name to the given projectName value.
|
void |
setUnresolvedVariables(Map<String,JobVariable> unresolvedVariables)
Sets the unresolved variable map for this job.
|
void |
setUserSpace(String userSpace)
Set the USER space value to the given USER space string value
|
void |
setVariables(Map<String,JobVariable> variables)
Sets the variable map for this job.
|
void |
setVisualization(String visualization)
Set the SVG code of the job visualization
|
String |
toString() |
static void |
verifyVariableMap(Map<String,? extends JobVariable> variables) |
addGenericInformation, addGenericInformations, applyReplacementsOnGenericInformation, getGenericInformation, getMaxNumberOfExecution, getMaxNumberOfExecutionProperty, getOnTaskErrorProperty, getRestartTaskOnError, getRestartTaskOnErrorProperty, getUnresolvedGenericInformation, setGenericInformation, setMaxNumberOfExecution, setOnTaskError, setRestartTaskOnError, setUnresolvedGenericInformation
public static final String JOB_DDL
public static final String JOB_EXEC_TIME
protected String name
protected String description
protected String projectName
protected JobPriority priority
protected String inputSpace
protected String outputSpace
protected String globalSpace
protected String userSpace
protected String visualization
protected Map<String,JobVariable> variables
protected Map<String,JobVariable> unresolvedVariables
public abstract JobType getType()
public abstract JobId getId()
public String getDescription()
public void setDescription(String description)
description
- the description to set.public String getName()
public void setName(String name)
name
- the name to set.public JobPriority getPriority()
public void setPriority(JobPriority priority)
priority
- the priority to set.public String getProjectName()
public void setProjectName(String projectName)
projectName
- the project Name to set.public String getInputSpace()
public void setInputSpace(String inputSpace)
inputSpace
- the input Space to setpublic String getOutputSpace()
public void setOutputSpace(String outputSpace)
outputSpace
- the outputDataSpaceURL to setpublic String getGlobalSpace()
public void setGlobalSpace(String globalSpace)
globalSpace
- the globalDataSpaceURL to setpublic String getUserSpace()
public void setUserSpace(String userSpace)
userSpace
- the userDataSpaceURL to setpublic String getVisualization()
public void setVisualization(String visualization)
visualization
- SVG code Stringpublic void setVariables(Map<String,JobVariable> variables)
variables
- the variables mappublic void setUnresolvedVariables(Map<String,JobVariable> unresolvedVariables)
unresolvedVariables
- the unresolved variables mappublic static void verifyVariableMap(Map<String,? extends JobVariable> variables)
public Map<String,JobVariable> getVariables()
public Map<String,JobVariable> getUnresolvedVariables()
public Map<String,String> getVariablesAsReplacementMap()
public String display()
public Optional<JobDeadline> getJobDeadline()
public String getJobContent()
public void setJobContent(String jobContent)