@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 |
bucketName
Bucket name for this job
|
protected String |
description
Short description of this job
|
protected Map<String,String> |
globalGenericInformation
Configured global generic information for this job
|
protected String |
globalSpace |
protected Map<String,JobVariable> |
globalVariables
Configured global variables for this job
|
protected String |
inputSpace |
static String |
JOB_DDL |
static String |
JOB_EXEC_TIME |
protected String |
label
Label for this job
|
protected String |
name
Name of the job
|
protected String |
outputSpace |
protected JobPriority |
priority
Job priority
|
protected String |
projectName
Project name for this job
|
protected Long |
startAt
Return the scheduled time of the job, defined by the generic information START_AT
|
protected String |
submissionMode
Returns the portal name via the job was submitted
|
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
|
protected Set<String> |
workflowTags
Tags of this job
|
DEFAULT_TASK_RETRY_DELAY, GENERIC_INFO_START_AT_KEY, genericInformation, maxNumberOfExecution, onTaskError, restartTaskOnError, taskRetryDelay, unresolvedGenericInformation
Constructor and Description |
---|
Job()
ProActive Empty Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
display() |
String |
getBucketName()
Returns the bucket name
|
String |
getDescription()
To get the description
|
Map<String,String> |
getGlobalGenericInformation()
Returns the global generic information of this job
|
String |
getGlobalSpace() |
Map<String,JobVariable> |
getGlobalVariables()
Returns the global variables of this job
|
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 |
getLabel()
Returns the label
|
String |
getName()
To get the name of the job.
|
String |
getOutputSpace()
Get the output Space
|
Long |
getParentId() |
JobPriority |
getPriority()
To get the priority of the job.
|
String |
getProjectName()
Returns the project Name.
|
Long |
getStartAt() |
String |
getSubmissionMode() |
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
|
Set<String> |
getWorkflowTags()
Returns the tags of this job
|
void |
setBucketName(String bucketName)
Sets the bucket name to the given bucketName value.
|
void |
setDescription(String description)
To set a short description for the job.
|
void |
setGlobalGenericInformation(Map<String,String> globalGenericInformation) |
void |
setGlobalSpace(String globalSpace)
Set the global Space value to the given GLOBAL space string value
|
void |
setGlobalVariables(Map<String,JobVariable> globalVariables) |
void |
setInputSpace(String inputSpace)
Set the input Space value to the given inputSpace value
|
void |
setJobContent(String jobContent) |
void |
setLabel(String label)
Sets the label of the job.
|
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 |
setParentId(Long parentId) |
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 |
setStartAt(Long startAt) |
void |
setSubmissionMode(String submissionMode) |
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
|
void |
setWorkflowTags(Set<String> workflowTags) |
String |
toString() |
static void |
verifyVariableMap(Map<String,? extends JobVariable> variables) |
addGenericInformation, addGenericInformations, applyReplacementsOnGenericInformation, getGenericInformation, getMaxNumberOfExecution, getMaxNumberOfExecutionProperty, getOnTaskErrorProperty, getRestartTaskOnError, getRestartTaskOnErrorProperty, getTaskRetryDelay, getTaskRetryDelayProperty, getUnresolvedGenericInformation, setGenericInformation, setMaxNumberOfExecution, setOnTaskError, setRestartTaskOnError, setTaskRetryDelay, setUnresolvedGenericInformation
public static final String JOB_DDL
public static final String JOB_EXEC_TIME
protected String name
protected String description
protected String projectName
protected String bucketName
protected String label
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
protected Map<String,JobVariable> globalVariables
protected Map<String,String> globalGenericInformation
protected String submissionMode
protected Long startAt
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 getBucketName()
public String getLabel()
public void setBucketName(String bucketName)
bucketName
- the bucket name to set.public void setLabel(String label)
label
- the label 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,JobVariable> getGlobalVariables()
public void setGlobalVariables(Map<String,JobVariable> globalVariables)
public Map<String,String> getGlobalGenericInformation()
public void setGlobalGenericInformation(Map<String,String> globalGenericInformation)
public Map<String,String> getVariablesAsReplacementMap()
public Long getStartAt()
public void setStartAt(Long startAt)
public String display()
public Optional<JobDeadline> getJobDeadline()
public String getJobContent()
public void setJobContent(String jobContent)
public Long getParentId()
public void setParentId(Long parentId)
public String getSubmissionMode()
public void setSubmissionMode(String submissionMode)