@Entity public class JobEntity extends BaseEntity implements FinishedJobProjection, JobProjection, JobRequestProjection, JobMetadataProjection, JobExecutionProjection, JobApplicationsProjection, JobClusterProjection, JobCommandProjection, JobSearchProjection, V4JobRequestProjection, JobSpecificationProjection, JobArchiveLocationProjection, IsV4JobProjection, JobApiProjection
Constructor and Description |
---|
JobEntity()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.util.Optional<java.lang.String> |
getAgentHostname()
Get the host name where the agent ran or is running the job.
|
java.util.Optional<java.lang.Integer> |
getAgentPid()
Get the pid of the agent that claimed this job.
|
java.util.Optional<java.lang.String> |
getAgentVersion()
Get the version of the agent that claimed this job.
|
java.util.Optional<java.lang.String> |
getArchiveLocation()
Get the location where the job was archived.
|
java.util.Optional<java.lang.Long> |
getCheckDelay()
Get the amount of time (in milliseconds) to delay the check for the job status.
|
java.util.Optional<ClusterEntity> |
getCluster()
Get the cluster that ran or is currently running a given job.
|
java.util.Optional<java.lang.String> |
getClusterName()
Get the name of the cluster that is running or did run this job.
|
java.util.Optional<CommandEntity> |
getCommand()
Get the command that ran or is currently running a given job.
|
java.util.Optional<java.lang.String> |
getCommandName()
Get the name of the command that is executing this job.
|
java.util.Optional<java.lang.String> |
getEmail()
Get the email of the user associated with this job if they desire an email notification at completion
of the job.
|
java.util.Optional<java.lang.Integer> |
getExitCode()
Get the exit code from the process that ran the job.
|
java.util.Optional<java.time.Instant> |
getFinished()
Get when the job was finished.
|
java.util.Optional<java.lang.String> |
getGenieUserGroup()
Get the user group for this job.
|
java.util.Optional<java.lang.String> |
getGrouping()
Get the grouping this job is a part of.
|
java.util.Optional<java.lang.String> |
getGroupingInstance()
Get the instance identifier of a grouping.
|
java.util.Optional<java.lang.String> |
getJobDirectoryLocation()
Get the job directory location the agent should use.
|
java.util.Optional<java.lang.Integer> |
getMemoryUsed()
Get the amount of memory (in MB) that this job is/was run with.
|
java.util.Optional<java.lang.Integer> |
getNumAttachments()
Get the number of attachments.
|
java.util.Optional<java.lang.Integer> |
getProcessId()
Get the process id of the job.
|
java.util.Optional<java.lang.String> |
getRequestAgentClientHostname()
Get the hostname of the agent that requested this job be run if there was one.
|
java.util.Optional<java.lang.Integer> |
getRequestAgentClientPid()
Get the PID of the agent that requested this job be run if there was one.
|
java.util.Optional<java.lang.String> |
getRequestAgentClientVersion()
Get the version of the agent that requested this job be run if there was one.
|
java.util.Optional<java.lang.String> |
getRequestApiClientHostname()
Get the request api client hostname.
|
java.util.Optional<java.lang.String> |
getRequestApiClientUserAgent()
Get the user agent.
|
java.util.Optional<java.lang.String> |
getRequestedAgentConfigExt()
Get the extension configuration of a job agent configuration.
|
java.util.Optional<java.lang.String> |
getRequestedAgentEnvironmentExt()
Get the extension configuration of a job agent environment.
|
java.util.Optional<java.lang.String> |
getRequestedArchiveLocationPrefix()
Get the archive location prefix uri for a job.
|
java.util.Optional<java.lang.Integer> |
getRequestedCpu()
Get the number of CPU's requested to run this job.
|
java.util.Optional<java.lang.String> |
getRequestedJobDirectoryLocation()
Get the requested directory on disk where the Genie job working directory should be placed if a user asked to
override the default.
|
java.util.Optional<java.lang.Integer> |
getRequestedMemory()
Get the memory requested to run this job with.
|
java.util.Optional<java.lang.Integer> |
getRequestedTimeout()
Get the timeout (in seconds) requested by the user for this job.
|
java.util.Optional<java.time.Instant> |
getStarted()
Get when the job was started.
|
java.util.Optional<java.lang.String> |
getStatusMsg()
Get the current status message of the job.
|
java.util.Optional<java.lang.Long> |
getStdErrSize()
Get the size of standard error for this job.
|
java.util.Optional<java.lang.Long> |
getStdOutSize()
Get the size of standard out for this job.
|
java.util.Optional<java.lang.Integer> |
getTimeoutUsed()
Get the final resolved timeout duration (in seconds) if there was one for this job.
|
java.util.Optional<java.lang.Long> |
getTotalSizeOfAttachments()
Get the total size of the attachments.
|
int |
hashCode() |
void |
setApplications(java.util.List<ApplicationEntity> applications)
Set the applications used to run this job.
|
void |
setCluster(ClusterEntity cluster)
Set the cluster this job ran on.
|
void |
setClusterCriteria(java.util.List<CriterionEntity> clusterCriteria)
Set the cluster criteria set for this job.
|
void |
setCommand(CommandEntity command)
Set the command used to run this job.
|
void |
setCommandArgs(java.util.List<java.lang.String> commandArgs)
Set the command arguments to use with this job.
|
void |
setCommandCriterion(CriterionEntity commandCriterion)
Set the command criterion.
|
void |
setConfigs(java.util.Set<FileEntity> configs)
Set all the files associated as configuration files for this job.
|
void |
setDependencies(java.util.Set<FileEntity> dependencies)
Set all the files associated as dependency files for this job.
|
void |
setEnvironmentVariables(java.util.Map<java.lang.String,java.lang.String> environmentVariables)
Set the environment variables for the job.
|
void |
setFinished(java.time.Instant finished)
Set the finishTime for the job.
|
void |
setRequestedEnvironmentVariables(java.util.Map<java.lang.String,java.lang.String> requestedEnvironmentVariables)
Set the requested environment variables.
|
void |
setStarted(java.time.Instant started)
Set the start time for the job.
|
void |
setStdErrSize(java.lang.Long stdErrSize)
Set the total size in bytes of the std err file for this job.
|
void |
setStdOutSize(java.lang.Long stdOutSize)
Set the total size in bytes of the std out file for this job.
|
void |
setTags(java.util.Set<TagEntity> tags)
Set all the tags associated to this job.
|
void |
setTimeoutUsed(java.lang.Integer timeoutUsed)
Set the final resolved timeout duration for this job.
|
getDescription, getMetadata, getSetupFile, setDescription, setMetadata, setSetupFile
getCreated, getUpdated, onCreateBaseEntity, onUpdateBaseEntity
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getApplications, getClusterCriteria, getCommandArgs, getCommandCriterion, getMetadata, getStatus, getTags
getApplications
getClusterCriteria, getCommandCriterion, getConfigs, getDependencies, getRequestedApplications, isArchivingDisabled
getCommandArgs, getTags
getDescription, getName, getUser, getVersion
getUniqueId
getCreated, getUpdated
getId
getSetupFile
getUniqueId
getUniqueId
getApplications
getName, getUniqueId, getUser
getStatus
getClusterCriteria, getCommandArgs, getCommandCriterion, getConfigs, getDependencies, getDescription, getMetadata, getName, getRequestedApplications, getRequestedEnvironmentVariables, getSetupFile, getTags, getUniqueId, getUser, getVersion, isArchivingDisabled, isInteractive, isRequestedId
getApplications, getCommandArgs, getConfigs, getDependencies, getEnvironmentVariables, getSetupFile, isInteractive, isResolved
isV4
isApi
public java.util.Optional<java.lang.String> getGenieUserGroup()
getGenieUserGroup
in interface JobRequestProjection
getGenieUserGroup
in interface V4JobRequestProjection
public java.util.Optional<java.lang.String> getEmail()
getEmail
in interface JobRequestProjection
getEmail
in interface V4JobRequestProjection
public java.util.Optional<java.lang.Integer> getRequestedCpu()
getRequestedCpu
in interface JobRequestProjection
getRequestedCpu
in interface V4JobRequestProjection
public java.util.Optional<java.lang.Integer> getRequestedTimeout()
getRequestedTimeout
in interface JobRequestProjection
getRequestedTimeout
in interface V4JobRequestProjection
public void setCommandCriterion(@Nullable CriterionEntity commandCriterion)
commandCriterion
- The criterion. Null clears reference.public java.util.Optional<java.lang.String> getGrouping()
getGrouping
in interface JobCommonFieldsProjection
getGrouping
in interface FinishedJobProjection
getGrouping
in interface V4JobRequestProjection
public java.util.Optional<java.lang.String> getGroupingInstance()
getGroupingInstance
in interface JobCommonFieldsProjection
getGroupingInstance
in interface FinishedJobProjection
getGroupingInstance
in interface V4JobRequestProjection
public java.util.Optional<java.lang.String> getStatusMsg()
getStatusMsg
in interface JobProjection
getStatusMsg
in interface FinishedJobProjection
public java.util.Optional<java.time.Instant> getStarted()
getStarted
in interface JobExecutionProjection
getStarted
in interface JobProjection
getStarted
in interface JobSearchProjection
getStarted
in interface FinishedJobProjection
public void setStarted(@Nullable java.time.Instant started)
started
- The started time.public java.util.Optional<java.time.Instant> getFinished()
getFinished
in interface JobProjection
getFinished
in interface JobSearchProjection
getFinished
in interface FinishedJobProjection
public void setFinished(@Nullable java.time.Instant finished)
finished
- The finished time.public java.util.Optional<java.lang.Integer> getRequestedMemory()
getRequestedMemory
in interface JobRequestProjection
getRequestedMemory
in interface FinishedJobProjection
getRequestedMemory
in interface V4JobRequestProjection
public java.util.Optional<java.lang.String> getRequestApiClientHostname()
getRequestApiClientHostname
in interface JobMetadataProjection
getRequestApiClientHostname
in interface FinishedJobProjection
Optional
of the client hostpublic java.util.Optional<java.lang.String> getRequestApiClientUserAgent()
getRequestApiClientUserAgent
in interface JobMetadataProjection
getRequestApiClientUserAgent
in interface FinishedJobProjection
Optional
of the user agentpublic java.util.Optional<java.lang.Integer> getNumAttachments()
getNumAttachments
in interface JobMetadataProjection
getNumAttachments
in interface FinishedJobProjection
Optional
public java.util.Optional<java.lang.String> getRequestAgentClientHostname()
getRequestAgentClientHostname
in interface FinishedJobProjection
Optional
public java.util.Optional<java.lang.String> getRequestAgentClientVersion()
getRequestAgentClientVersion
in interface FinishedJobProjection
Optional
public java.util.Optional<java.lang.Integer> getExitCode()
getExitCode
in interface JobExecutionProjection
getExitCode
in interface FinishedJobProjection
public java.util.Optional<java.lang.String> getArchiveLocation()
getArchiveLocation
in interface JobArchiveLocationProjection
getArchiveLocation
in interface FinishedJobProjection
public java.util.Optional<java.lang.Integer> getMemoryUsed()
getMemoryUsed
in interface JobExecutionProjection
getMemoryUsed
in interface FinishedJobProjection
Optional
as it could be nullpublic java.util.Optional<ClusterEntity> getCluster()
getCluster
in interface JobClusterProjection
getCluster
in interface FinishedJobProjection
getCluster
in interface JobSpecificationProjection
public void setCluster(@Nullable ClusterEntity cluster)
cluster
- The cluster this job ran onpublic java.util.Optional<CommandEntity> getCommand()
getCommand
in interface JobCommandProjection
getCommand
in interface FinishedJobProjection
getCommand
in interface JobSpecificationProjection
public void setCommand(@Nullable CommandEntity command)
command
- The commandpublic java.util.Optional<java.lang.Long> getTotalSizeOfAttachments()
getTotalSizeOfAttachments
in interface JobMetadataProjection
public java.util.Optional<java.lang.Long> getStdOutSize()
getStdOutSize
in interface JobMetadataProjection
public void setStdOutSize(@Nullable java.lang.Long stdOutSize)
stdOutSize
- The size. Null empties database fieldpublic java.util.Optional<java.lang.Long> getStdErrSize()
getStdErrSize
in interface JobMetadataProjection
public void setStdErrSize(@Nullable java.lang.Long stdErrSize)
stdErrSize
- The size. Null empties database fieldpublic java.util.Optional<java.lang.Integer> getRequestAgentClientPid()
Optional
public java.util.Optional<java.lang.String> getClusterName()
getClusterName
in interface JobProjection
getClusterName
in interface JobSearchProjection
public java.util.Optional<java.lang.String> getCommandName()
getCommandName
in interface JobProjection
getCommandName
in interface JobSearchProjection
public java.util.Optional<java.lang.String> getAgentHostname()
getAgentHostname
in interface AgentHostnameProjection
Optional
public java.util.Optional<java.lang.String> getAgentVersion()
Optional
in case it wasn't set yet in which case it will be
Optional.empty()
public java.util.Optional<java.lang.Integer> getAgentPid()
Optional
in case it wasn't set yet in which case it will be
Optional.empty()
public java.util.Optional<java.lang.Integer> getProcessId()
getProcessId
in interface JobExecutionProjection
public java.util.Optional<java.lang.Long> getCheckDelay()
getCheckDelay
in interface JobExecutionProjection
public java.util.Optional<java.lang.Integer> getTimeoutUsed()
getTimeoutUsed
in interface JobExecutionProjection
getTimeoutUsed
in interface JobSpecificationProjection
Optional
public void setTimeoutUsed(@Nullable java.lang.Integer timeoutUsed)
timeoutUsed
- The timeout value (in seconds) after which this job should be killed by the systempublic void setCommandArgs(@Nullable java.util.List<java.lang.String> commandArgs)
commandArgs
- The command arguments to usepublic void setConfigs(@Nullable java.util.Set<FileEntity> configs)
configs
- The configuration files to setpublic void setDependencies(@Nullable java.util.Set<FileEntity> dependencies)
dependencies
- The dependency files to setpublic void setTags(@Nullable java.util.Set<TagEntity> tags)
tags
- The tags to setpublic void setRequestedEnvironmentVariables(@Nullable java.util.Map<java.lang.String,java.lang.String> requestedEnvironmentVariables)
requestedEnvironmentVariables
- The environment variables the user requested be added to the job runtimepublic void setEnvironmentVariables(@Nullable java.util.Map<java.lang.String,java.lang.String> environmentVariables)
environmentVariables
- The final set of environment variables that were set in the job runtimepublic java.util.Optional<java.lang.String> getRequestedJobDirectoryLocation()
getRequestedJobDirectoryLocation
in interface V4JobRequestProjection
Optional
public java.util.Optional<java.lang.String> getRequestedAgentEnvironmentExt()
getRequestedAgentEnvironmentExt
in interface V4JobRequestProjection
Optional
public java.util.Optional<java.lang.String> getRequestedAgentConfigExt()
getRequestedAgentConfigExt
in interface V4JobRequestProjection
Optional
public java.util.Optional<java.lang.String> getRequestedArchiveLocationPrefix()
getRequestedArchiveLocationPrefix
in interface V4JobRequestProjection
Optional
public java.util.Optional<java.lang.String> getJobDirectoryLocation()
getJobDirectoryLocation
in interface JobSpecificationProjection
Optional
public void setApplications(@Nullable java.util.List<ApplicationEntity> applications)
applications
- The applicationspublic void setClusterCriteria(@Nullable java.util.List<CriterionEntity> clusterCriteria)
clusterCriteria
- The cluster criteria in priority orderpublic boolean equals(java.lang.Object o)
equals
in class BaseEntity
public int hashCode()
hashCode
in class BaseEntity