@Entity public class JobRequestEntity extends SetupFileEntity
GENIE_ID_TAG_NAMESPACE, GENIE_NAME_TAG_NAMESPACE, GENIE_TAG_NAMESPACE, TAG_DELIMITER, TAG_DELIMITER_REGEX
Constructor and Description |
---|
JobRequestEntity() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getApplications()
Gets the applications for the job as JSON array.
|
java.util.List<java.lang.String> |
getApplicationsAsList()
Get the applications to use for this job as a List of ids.
|
protected java.lang.String |
getClusterCriterias()
Get the cluster criteria's as a JSON string.
|
java.util.List<ClusterCriteria> |
getClusterCriteriasAsList()
Gets the cluster criteria which was specified to pick a cluster to run
the job.
|
protected java.lang.String |
getCommandCriteria()
Get the command criteria specified to run this job in string format.
|
java.util.Set<java.lang.String> |
getCommandCriteriaAsSet()
Gets the command criteria which was specified to pick a command to run
the job.
|
java.util.Optional<java.lang.Integer> |
getCpu()
Get the number of CPU's requested to run this job.
|
protected java.lang.String |
getDependencies()
Gets the dependencies for the job as JSON array.
|
java.util.Set<java.lang.String> |
getDependenciesAsSet()
Get the file dependencies as a set of strings.
|
JobRequest |
getDTO()
Get a DTO representing this job request.
|
java.util.Optional<java.lang.String> |
getEmail()
Gets the email address needed to send an email on job completion.
|
java.util.Optional<java.lang.String> |
getGroup()
Gets the group name of the user who submitted the job.
|
java.util.Optional<java.lang.Integer> |
getMemory()
Get the memory requested to run this job with.
|
java.util.Optional<java.lang.Integer> |
getTimeout()
Get the timeout (in seconds) requested by the user for this job.
|
protected void |
setApplications(java.lang.String applications)
Sets the dependencies for the job.
|
void |
setApplicationsFromList(java.util.List<java.lang.String> applicationsList)
Sets the dependencies for the job request from a set of strings.
|
protected void |
setClusterCriterias(java.lang.String clusterCriterias)
Set the cluster criterias JSON string.
|
void |
setClusterCriteriasFromList(java.util.List<ClusterCriteria> clusterCriteriasList)
Sets the list of cluster criteria specified to pick a cluster.
|
protected void |
setCommandCriteria(java.lang.String commandCriteria)
Set the command criteria string of JSON.
|
void |
setCommandCriteriaFromSet(java.util.Set<java.lang.String> commandCriteriaSet)
Sets the set of command criteria specified to pick a command.
|
protected void |
setDependencies(java.lang.String dependencies)
Sets the dependencies for the job.
|
void |
setDependenciesFromSet(java.util.Set<java.lang.String> dependenciesSet)
Sets the dependencies for the job request from a set of strings.
|
getSetupFile
getDescription, getFinalTags, getTags, setTags
getCreated, getEntityVersion, getId, getUpdated, onCreateBaseEntity, onUpdateBaseEntity, setCreated, setEntityVersion, setId, setUpdated
public java.util.Optional<java.lang.String> getGroup()
public java.util.List<ClusterCriteria> getClusterCriteriasAsList() throws GenieException
GenieException
- on any errorpublic void setClusterCriteriasFromList(@NotEmpty java.util.List<ClusterCriteria> clusterCriteriasList) throws GenieException
clusterCriteriasList
- The criteria list. Not null or empty.GenieException
- If any precondition isn't met.protected java.lang.String getClusterCriterias()
protected void setClusterCriterias(@NotBlank java.lang.String clusterCriterias)
clusterCriterias
- The cluster criterias.public java.util.Set<java.lang.String> getDependenciesAsSet() throws GenieException
GenieException
- On any exceptionpublic void setDependenciesFromSet(java.util.Set<java.lang.String> dependenciesSet) throws GenieException
dependenciesSet
- Dependent files for the jobGenieException
- for any processing errorprotected java.lang.String getDependencies()
protected void setDependencies(java.lang.String dependencies)
dependencies
- Dependent files for the job in csv formatpublic java.util.Optional<java.lang.String> getEmail()
public java.util.Set<java.lang.String> getCommandCriteriaAsSet() throws GenieException
GenieException
- on any processing errorpublic void setCommandCriteriaFromSet(@NotEmpty java.util.Set<java.lang.String> commandCriteriaSet) throws GenieException
commandCriteriaSet
- The criteria set. Not null/emptyGenieException
- If any precondition isn't met.protected java.lang.String getCommandCriteria()
protected void setCommandCriteria(java.lang.String commandCriteria)
commandCriteria
- A set of command criteria tags as a JSON arraypublic java.util.Optional<java.lang.Integer> getCpu()
public java.util.Optional<java.lang.Integer> getMemory()
public java.util.Optional<java.lang.Integer> getTimeout()
public java.util.List<java.lang.String> getApplicationsAsList() throws GenieException
GenieException
- On any exceptionpublic void setApplicationsFromList(java.util.List<java.lang.String> applicationsList) throws GenieException
applicationsList
- Application IDs for the jobGenieException
- for any processing errorprotected java.lang.String getApplications()
protected void setApplications(java.lang.String applications)
applications
- Applications for the job in JSON array stringpublic JobRequest getDTO() throws GenieException
GenieException
- For any processing error