com.ace.moab.api.jobs
Class MoabJob

java.lang.Object
  extended by com.ace.moab.api.jobs.MoabJob
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MoabJob>

public class MoabJob
extends java.lang.Object
implements java.lang.Comparable<MoabJob>, java.io.Serializable

Author:
tfw (Athough hardly any code from Trent's days still exist now)
See Also:
Serialized Form

Constructor Summary
MoabJob()
           
 
Method Summary
 void addAllocatedNode(JobAllocatedNode allocatedNode)
           Adds an allocated node to the list of nodes this job is using to run.
 void addGenericResource(GenericResource genericResource)
          Add a new generic resource to the generic resource list.
 void addJobRequirement(JobRequirement requirement)
          Adds a requirement to the list of job requirements on the job.
 void addMessage(java.lang.String message)
          Adds a message and a newline to existing list of messages.
 void addVariable(Variable variable)
           Adds a variable to the set of variables this job owns.
 void clearAllocatedNodeList()
          Clears the list of allocated nodes the job is using to run.
 int compareTo(MoabJob o)
          Compares the jobID of this job to the other job's jobID.
 java.lang.String getAccount()
           Returns the account used for billing purposes for the job.
 long getActiveDuration()
          Returns the duration in seconds the job has spent being active or running.
 JobAllocatedNodes getAllocatedNodes()
           Returns the set of nodes allocated for use by the job to run.
 JobBlockReason getBlockReason()
           Returns the reason the job is blocked.
 int getBypass()
          Returns the number of times the job has been backfilled.
 java.lang.String getCommandFile()
           Returns the path to the file that is executed when the job runs.
 java.lang.String getCommandLineArguments()
           Returns the command line arguments passed into running the job.
 java.util.Date getCompletionTime()
           Returns the date the job completed.
 java.lang.String getCredentialID(CredentialType credType)
          Returns the ID of the credential of the type passed in which corresponds to this job.
 double getDedicatedProcSeconds()
           Returns the number of processor seconds dedicated to this job.
 DynamicJobInformation getDynamicJobInformation()
           Returns the dynamic job and job template information for the job.
 java.util.Date getEarliestStartDate()
           Returns the system specified earliest start date.
 java.util.Date getEarliestStartDateRequested()
           Returns the earliest start date and time requested by the job.
 long getEffectiveQueueDuration()
          Returns the duration in seconds the job has been eligible to run in the queue.
 JobState getExpectedState()
           Returns the state expected based on scheduler action.
 JobFlags getFlags()
           Returns the flags for the job.
 java.util.List<java.lang.String> getGenericAttributes()
           Returns the list of generic attributes the job has requested.
 java.util.List<GenericResource> getGenericResourcesList()
          get the generic resource list
 java.lang.String getGroup()
           Returns the group the job is run under.
 java.util.Set<JobHoldType> getHolds()
           Sets the holds that are currently on the job.
 java.util.Set<java.lang.String> getHostList()
           Returns the set of hosts/nodes the job is running on.
 java.lang.String getInitialWorkingDirectory()
           Returns the path to the directory the job will be started in.
 java.util.List<JobDependency> getJobDependecyList()
           Returns the list of dependencies for this job.
 java.lang.String getJobID()
           Returns the unique ID of the job.
 java.lang.String getJobName()
           Returns the user specified name of the job.
 java.util.List<JobRequirement> getJobRequirements()
           Returns the list of job requirements this job has that specifies what it needs to run.
 java.util.Date getLatestCompletedDateRequested()
           Returns the latest date and time the job must be completed by.
 java.lang.String getMasterHost()
           Returns the node/host that the primary task will run on.
 int getMemoryRequested()
          Returns the amount of memory in MB requested by the job.
 java.util.List<java.lang.String> getMessages()
           Returns the list of system set and user specified message.
 int getNodeCount()
          Returns the number of nodes this job is using.
 int getNodeCountRequested()
          Returns the number of nodes the job has requested.
 java.util.Set<JobEmailNotifyType> getNotifyTypeList()
           Returns the set of e-mail notify types attached to the job.
 java.util.Set<java.lang.String> getPartitionAccessList()
           Returns the list of partitions that this job has access to.
 int getProcCountRequested()
          Returns the number of processors the job has requested.
 java.lang.String getQos()
           Returns the QoS the job is actually running under.
 java.lang.String getQosRequested()
           Returns the QoS the job requested.
 java.lang.String getQueue()
           Returns the class that the job is wanting to or actually running in.
 QueueStatus getQueueStatus()
           Returns the status of the job in its queue.
 java.lang.String getReservationRequested()
           Returns the reservation that job requested.
 java.util.Date getReservationStartDate()
           Returns the actual start date of the reservation the job is running inside of.
 java.lang.String getResourceManagerExtension()
           Returns the resource manager extension String that describes information passed to the the resource manager accounting for the job.
 java.lang.String getResourceManagerName()
           Returns the name of the resource manager that is reporting this job.
 java.lang.String getRmStdErrorFilePath()
           Returns the path to the remote file containing the standard error output of the job.
 java.lang.String getRmStdInputFilePath()
           Returns the path to the remote file containing the standard input of the job.
 java.lang.String getRmStdOutputFilePath()
           Returns the remote path to the file containing the standard output of the job.
 long getRunPriority()
          Returns the priority to start running the job.
 SLAViolationType getSLAViolationType()
           Returns the worst-case violation of a job's target SLA information as reported in a violation type category.
 double getSLAViolationValue()
           Returns the worst-case violation of a job's target SLA information as reported in a percentage.
 int getStartCount()
           Returns the number of times this job was started.
 java.util.Date getStartDate()
           Returns the date that this job actually started.
 long getStartPriority()
           Returns the effective job priority level.
 JobState getState()
           Get the job's current state.
 java.lang.String getStdErrorFilePath()
           Returns the path to the file containing the standard error output of the job.
 java.lang.String getStdInputFilePath()
           Returns the path to the file containing the standard input of the job.
 java.lang.String getStdOutputFilePath()
           Returns the path to the file containing the standard output of the job.
 java.util.Date getSubmitDate()
           Returns the date when this job was submitted.
 long getSuspendDuration()
           Get the amount of time the job has been suspended
 java.lang.String getSystemID()
           Returns the system ID of the job as reported by an external source.
 java.lang.String getSystemJobID()
           Returns the job ID according to an external source such as a resource manager.
 long getSystemPriority()
           Get the administrator specified system priority level.
 java.util.List<java.lang.String> getTemplateMatchList()
           Returns the list of strings representing job templates that match this job.
 java.util.List<java.lang.String> getTemplateSetList()
           Returns the list of strings representing job templates that were set on this job.
 java.lang.String getUser()
           Returns the user that is running the job.
 long getUserPriority()
           Returns the user-specified priority for the job.
 double getUtilizedMemorySeconds()
           Returns the number of memory seconds utilized by job.
 double getUtilizedProcSeconds()
           Returns the number of processor seconds utilized by job
 java.util.Set<Variable> getVariables()
           Get the set of variables this job "owns" or sets on completion.
 VMUsagePolicy getVMUsagePolicy()
          Returns the requested virtual machine usage policy for the job.
 long getWallclockRequested()
           Returns the wallclock requested in seconds.
 boolean isDynamic()
           Returns true if the job is dynamic.
 boolean isTemplate()
          Returns whether or not this job object is actually a template description or an actual job.
 void removeJobRequirement(JobRequirement requirement)
          Attempts to remove the job requirement from the list of requirements on the job.
 void removeVariable(Variable variable)
           Removes a variable from the set of variables this job owns.
 void setAccount(java.lang.String account)
           Sets the account that this job is to run under for billing purposes
 void setActiveDuration(long activeDuration)
          Sets the duration in seconds the job has spent being active or running.
 void setAllocatedNodes(java.util.Set<JobAllocatedNode> allocatedNodes)
           Sets the set of nodes allocated for use by the job to run.
 void setBlockReason(JobBlockReason blockReason)
           Sets the reason the job is blocked.
 void setBypass(int bypass)
          Sets the number of times the job has been backfilled.
 void setCommandFile(java.lang.String commandFile)
           Sets the path to the file that is executed when the job runs.
 void setCommandLineArguments(java.lang.String commandLineArguments)
           Sets the command line arguments passed into running the job.
 void setCompletionTime(java.util.Date completionDate)
           Sets the date the job completed.
 void setDedicatedProcSeconds(double dedicatedProcSeconds)
           Sets the processor seconds dedicated to the job.
 void setDynamicJobInformation(DynamicJobInformation jobTemplateExtension)
           Sets the job template and dynamic job information.
 void setEarliestStartDate(java.util.Date earliestStartDate)
           Sets the system specified earliest start date.
 void setEarliestStartDateRequested(java.util.Date earliestStartDateRequested)
           Sets the earliest start date that the job requests.
 void setEffectiveQueueDuration(long effectiveQueueDuration)
          Sets the duration in seconds the job has been eligible to run in the queue.
 void setExpectedState(JobState jobState)
           Returns the state expected based on scheduler action.
 void setFlags(JobFlags jobFlags)
           Sets the flags for the job.
 void setGenericAttributes(java.util.List<java.lang.String> genericAttributes)
           Sets the list of generic attributes the job has requested.
 void setGenericResourcesList(java.util.List<GenericResource> genericResourcesList)
          Set the new generic resource list.
 void setGroup(java.lang.String group)
           Sets the group the job is run under.
 void setHolds(java.util.Set<JobHoldType> holds)
           Sets the holds that are currently on the job.
 void setHostList(java.util.Set<java.lang.String> hostList)
           Sets the set of hosts/nodes the job is running on.
 void setInitialWorkingDirectory(java.lang.String initialWorkingDirectory)
           Sets the path to the directory the job will be started in.
 void setJobDependecyList(java.util.List<JobDependency> jobDependecyList)
           Sets the list of dependencies for this job.
 void setJobID(java.lang.String jobID)
           Sets the unique ID for the job.
 void setJobName(java.lang.String jobName)
           Sets the user specified job name.
 void setLatestCompletedDateRequested(java.util.Date latestCompletionDateRequested)
           Sets the latest date and time the job must be completed by.
 void setMasterHost(java.lang.String masterHost)
           Sets the node/host that the primary task will run on.
 void setMemoryRequested(int memoryRequested)
          Sets the amount of memory in MB requested by the job.
 void setMessages(java.util.List<java.lang.String> messages)
           Sets the list of system set and user specified message.
 void setNodeCountRequested(int nodeCountRequested)
          Sets the number of nodes the job has requested.
 void setNotifyTypeList(java.util.Set<JobEmailNotifyType> notifyTypeList)
           Sets the set of e-mail notify types attached to the job.
 void setPartitionAccessList(java.util.Set<java.lang.String> partitionAccessList)
           Sets the list of partitions that this job has access to.
 void setProcCountRequested(int procCountRequested)
          Sets the number of processors the job has requested.
 void setQos(java.lang.String qos)
           Sets the QoS the job is actually running under.
 void setQosRequested(java.lang.String qosRequested)
           Sets the QoS the job requested.
 void setQueue(java.lang.String queue)
           Sets the class that the job is wanting to or actually running in.
 void setQueueStatus(QueueStatus queueStatus)
           Sets the status of the job in its queue.
 void setReservationRequested(java.lang.String reservationRequested)
           Sets the reservation that job requested.
 void setReservationStartDate(java.util.Date reservationStartDate)
           Sets the actual start date of the reservation the job is running inside of.
 void setResourceManagerExtension(java.lang.String resourceManagerExtension)
           Sets the resource manager extension String that describes information passed to the the resource manager accounting for the job.
 void setResourceManagerName(java.lang.String resourceManagerName)
           Sets the name of the resource manager that is reporting this job.
 void setRmStdErrorFilePath(java.lang.String stdErrorFile)
          Sets the path to the remote file containing the standard error output of the job
 void setRmStdInputFilePath(java.lang.String stdErrorFile)
           Sets the path to the remote file containing the standard input of the job.
 void setRmStdOutputFilePath(java.lang.String rmStdOutputFile)
          Sets the path to the remote file containing the standard output of the job
 void setRunPriority(long runPriority)
          Sets the priority to start running the job.
 void setStartCount(int startCount)
           Sets the number of times this job was started.
 void setStartDate(java.util.Date startDate)
           Sets the job's actual start time.
 void setStartPriority(long startPriority)
           Sets the effective job priority level.
 void setState(JobState jobState)
           Sets the job's current state.
 void setStdErrorFilePath(java.lang.String stdErrorFile)
          Sets the path to the file containing the standard error output of the job
 void setStdInputFilePath(java.lang.String stdInFilePath)
           Sets the path to the file containing the standard input of the job.
 void setStdOutputFilePath(java.lang.String stdOutputFile)
          Sets the path to the file containing the standard output of the job
 void setSubmitDate(java.util.Date submitDate)
           Sets the date this job was submitted.
 void setSuspendDuration(long suspendDuration)
           Set the amount of time in seconds the job has been suspended.
 void setSystemID(java.lang.String systemID)
           Sets the system ID of the job as reported by an external source.
 void setSystemJobID(java.lang.String systemJobID)
           Sets the job ID according to an external source such as a resource manager.
 void setSystemPriority(long systemPriority)
           Get the administrator specified system priority level.
 void setTemplate(boolean isTemplate)
          Sets whether or not this job object is actually a template description or an actual job.
 void setTemplateMatchList(java.util.List<java.lang.String> templateMatchList)
           Sets the list of templates that match this job.
 void setTemplateSetList(java.util.List<java.lang.String> templateSetList)
           Sets the list of template sets that are applied to this job.
 void setUser(java.lang.String user)
           Sets the user running the job.
 void setUserPriority(long userPriority)
           Sets the priority as specified by the user.
 void setUtilizedMemorySeconds(double utilizedMemorySeconds)
           Sets the memory seconds utilized by the job.
 void setUtilizedProcSeconds(double utilizedProcSeconds)
           Sets the processor seconds utilized by the job.
 void setVariables(java.util.Set<Variable> variables)
           Sets the set of variables this job "owns" or sets on completion.
 void setVMUsagePolicy(VMUsagePolicy vmUsagePolicy)
          Sets the requested virtual machine usage policy for the job.
 void setWallclockRequested(long wallclockRequested)
          Sets the wallclock the job requested in seconds.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MoabJob

public MoabJob()
Method Detail

addAllocatedNode

public void addAllocatedNode(JobAllocatedNode allocatedNode)

Adds an allocated node to the list of nodes this job is using to run.

If the node is already in the node list, then the addition request is ignored.

Parameters:
allocatedNode - the name of the node to add to the allocated list.

addJobRequirement

public void addJobRequirement(JobRequirement requirement)
Adds a requirement to the list of job requirements on the job.

Parameters:
requirement - the requirement to add to the job.

addMessage

public void addMessage(java.lang.String message)
Adds a message and a newline to existing list of messages.

Parameters:
message - The new message to add.

addVariable

public void addVariable(Variable variable)

Adds a variable to the set of variables this job owns.

If the variable is already in the set, then the addition request is ignored.

Parameters:
variable - the variable to be added to the set of variables

clearAllocatedNodeList

public void clearAllocatedNodeList()
Clears the list of allocated nodes the job is using to run.


compareTo

public int compareTo(MoabJob o)
Compares the jobID of this job to the other job's jobID. These values should be unique for each job. For more details about the result, see java.lang.String's compareTo method.

It should be noted that the reason only the jobIDs are compared instead of all job attributes is because different Moab queries return different attributes. In other words, if a user used one call to get one MoabJob object and a different call to get the other MoabJob object, the attributes might be set from one call but not the other, but the jobIDs will always be the same if it is the same job according to Moab. For this purpose, only the jobIDs are compared, even if not all the attributes had been set.

Specified by:
compareTo in interface java.lang.Comparable<MoabJob>

getAccount

public java.lang.String getAccount()

Returns the account used for billing purposes for the job.

Can be null.

Returns:
the account used for billing purposes for the job.

getActiveDuration

public long getActiveDuration()
Returns the duration in seconds the job has spent being active or running.

Returns:
the duration in seconds the job has spent being active or running.

getAllocatedNodes

public JobAllocatedNodes getAllocatedNodes()

Returns the set of nodes allocated for use by the job to run.

Cannot be null.

Returns:
the set of nodes allocated for use by the job to run.

getBlockReason

public JobBlockReason getBlockReason()

Returns the reason the job is blocked.

Can be null.

Returns:
the reason the job is blocked.

getBypass

public int getBypass()
Returns the number of times the job has been backfilled.

Returns:
the number of times the job has been backfilled.

getCommandFile

public java.lang.String getCommandFile()

Returns the path to the file that is executed when the job runs.

Can be null.

Returns:
the path to the file that is executed when the job runs.

getCommandLineArguments

public java.lang.String getCommandLineArguments()

Returns the command line arguments passed into running the job.

Can be null.

Returns:
the command line arguments passed into running the job.

getCompletionTime

public java.util.Date getCompletionTime()

Returns the date the job completed.

If null, the job hasn't completed yet.

Returns:
the date the job completed.

getCredentialID

public java.lang.String getCredentialID(CredentialType credType)
Returns the ID of the credential of the type passed in which corresponds to this job. For example, if someone passed in CredentialType.USER, this method would return the ID of the user that ran this job

Returns:
the ID of the credential of the type passed in which corresponds to this job

getDedicatedProcSeconds

public double getDedicatedProcSeconds()

Returns the number of processor seconds dedicated to this job.

Returns:
the number of processor seconds dedicated to this job

getDynamicJobInformation

public DynamicJobInformation getDynamicJobInformation()

Returns the dynamic job and job template information for the job.

Cannot be null.

Returns:
the dynamic job and job template information for the job.

getEarliestStartDate

public java.util.Date getEarliestStartDate()

Returns the system specified earliest start date.

Can be null.

Returns:
the system specified earliest start date.

getEarliestStartDateRequested

public java.util.Date getEarliestStartDateRequested()

Returns the earliest start date and time requested by the job.

Can be null.

Returns:
the earliest start date and time requested by the job.

getEffectiveQueueDuration

public long getEffectiveQueueDuration()
Returns the duration in seconds the job has been eligible to run in the queue.

Returns:
the duration in seconds the job has been eligible to run in the queue.

getExpectedState

public JobState getExpectedState()

Returns the state expected based on scheduler action.

Null cannot be returned. Instead JobState.NONE will be returned.

Returns:
the state expected based on scheduler action.

getFlags

public JobFlags getFlags()

Returns the flags for the job.

Cannot be null.

Returns:
the flags for the job.

getGenericAttributes

public java.util.List<java.lang.String> getGenericAttributes()

Returns the list of generic attributes the job has requested.

Can be null.

Returns:
the list of generic attributes the job has requested.

getGroup

public java.lang.String getGroup()

Returns the group the job is run under.

Can be null.

Returns:
the group the job is run under.

getHolds

public java.util.Set<JobHoldType> getHolds()

Sets the holds that are currently on the job.

Can be null.

Returns:
the holds that are currently on the job.

getHostList

public java.util.Set<java.lang.String> getHostList()

Returns the set of hosts/nodes the job is running on.

Can be null.

Returns:
the set of hosts/nodes the job is running on.

getInitialWorkingDirectory

public java.lang.String getInitialWorkingDirectory()

Returns the path to the directory the job will be started in.

Can be null.

Returns:
the path to the directory the job will be started in.

getJobID

public java.lang.String getJobID()

Returns the unique ID of the job.

Can be null.

Returns:
the unique ID of the job.

getJobName

public java.lang.String getJobName()

Returns the user specified name of the job.

Can be null.

Returns:
the user specified name of the job.

getJobRequirements

public java.util.List<JobRequirement> getJobRequirements()

Returns the list of job requirements this job has that specifies what it needs to run.

Can be null.

Returns:
the list of job requirements this job has that specifies what it needs to run.

getLatestCompletedDateRequested

public java.util.Date getLatestCompletedDateRequested()

Returns the latest date and time the job must be completed by.

Can be null.

Returns:
the latest date and time the job must be completed by.

getMasterHost

public java.lang.String getMasterHost()

Returns the node/host that the primary task will run on.

Can be null.

Returns:
the node/host that the primary task will run on.

getMemoryRequested

public int getMemoryRequested()
Returns the amount of memory in MB requested by the job.

Returns:
the amount of memory in MB requested by the job.

getMessages

public java.util.List<java.lang.String> getMessages()

Returns the list of system set and user specified message.

Can be null.

Returns:
the list of system set and user specified message.

getNodeCount

public int getNodeCount()
Returns the number of nodes this job is using.

Returns:
the number of nodes this job is using.

getNodeCountRequested

public int getNodeCountRequested()
Returns the number of nodes the job has requested.

Returns:
the number of nodes the job has requested.

getPartitionAccessList

public java.util.Set<java.lang.String> getPartitionAccessList()

Returns the list of partitions that this job has access to.

Can be null.

Returns:
the list of partitions that this job has access to.

getProcCountRequested

public int getProcCountRequested()
Returns the number of processors the job has requested.

Returns:
the number of processors the job has requested.

getQos

public java.lang.String getQos()

Returns the QoS the job is actually running under.

Can be null.

Returns:
the QoS the job is actually running under.

getQosRequested

public java.lang.String getQosRequested()

Returns the QoS the job requested.

This may not be the actual QoS the job is given based on policies. Can be null.

Returns:
the QoS the job requested.

getQueue

public java.lang.String getQueue()

Returns the class that the job is wanting to or actually running in.

Can be null.

Returns:
the class that the job is wanting to or actually running in.

getQueueStatus

public QueueStatus getQueueStatus()

Returns the status of the job in its queue.

Cannot be null.

Returns:
the status of the job in its queue.

getReservationRequested

public java.lang.String getReservationRequested()

Returns the reservation that job requested.

Can be null.

Returns:
the reservation that job requested.

getReservationStartDate

public java.util.Date getReservationStartDate()

Returns the actual start date of the reservation the job is running inside of.

Can be null.

Returns:
the actual start date of the reservation the job is running inside of.

getResourceManagerExtension

public java.lang.String getResourceManagerExtension()

Returns the resource manager extension String that describes information passed to the the resource manager accounting for the job.

Can be null.

Returns:
the resource manager extension String that describes information passed to the the resource manager accounting for the job.

getResourceManagerName

public java.lang.String getResourceManagerName()

Returns the name of the resource manager that is reporting this job.

Can be null.

Returns:
the name of the resource manager that is reporting this job.

getRunPriority

public long getRunPriority()
Returns the priority to start running the job.

Returns:
the priority to start running the job.

getStartCount

public int getStartCount()

Returns the number of times this job was started.

Returns:
the number of times this job was started

getStartDate

public java.util.Date getStartDate()

Returns the date that this job actually started.

Returns:
the date that this job actually started.

getStartPriority

public long getStartPriority()

Returns the effective job priority level.

Returns:
the effective job priority level

getState

public JobState getState()

Get the job's current state.

Null cannot be returned. Instead JobState.NONE will be returned.

Returns:
the job's current state

getStdErrorFilePath

public java.lang.String getStdErrorFilePath()

Returns the path to the file containing the standard error output of the job.

Can be null.

Returns:
the path to the file containing the job's standard error (STDERR)

getRmStdErrorFilePath

public java.lang.String getRmStdErrorFilePath()

Returns the path to the remote file containing the standard error output of the job.

Can be null.

Returns:
the path to the remote file containing the job's standard error (STDERR)

getStdInputFilePath

public java.lang.String getStdInputFilePath()

Returns the path to the file containing the standard input of the job.

Can be null.

Returns:
the path to the file containing the standard input of the job.

getRmStdInputFilePath

public java.lang.String getRmStdInputFilePath()

Returns the path to the remote file containing the standard input of the job.

Can be null.

Returns:
the path to the remote file containing the standard input of the job.

getStdOutputFilePath

public java.lang.String getStdOutputFilePath()

Returns the path to the file containing the standard output of the job.

Can be null.

Returns:
the stdOutputFile the path to the file containing the standard output of the job.

getRmStdOutputFilePath

public java.lang.String getRmStdOutputFilePath()

Returns the remote path to the file containing the standard output of the job.

Can be null.

Returns:
the stdOutputFile the path to the remote file containing the standard output of the job.

getSubmitDate

public java.util.Date getSubmitDate()

Returns the date when this job was submitted.

Returns:
the date thiss job was submitted.

getSuspendDuration

public long getSuspendDuration()

Get the amount of time the job has been suspended

Returns:
the amount of time the job has been suspended

getSystemID

public java.lang.String getSystemID()

Returns the system ID of the job as reported by an external source.

Can be null.

Returns:
the system ID of the job as reported by an external source.

getSystemJobID

public java.lang.String getSystemJobID()

Returns the job ID according to an external source such as a resource manager.

Can be null.

Returns:
the job ID according to an external source such as a resource manager.

getSystemPriority

public long getSystemPriority()

Get the administrator specified system priority level.

Defaults to 0 if no priority is set.

Returns:
the administrator specified system priority level

getTemplateMatchList

public java.util.List<java.lang.String> getTemplateMatchList()

Returns the list of strings representing job templates that match this job.

Can be null.

Returns:
the list of strings representing job templates that match this job.

getTemplateSetList

public java.util.List<java.lang.String> getTemplateSetList()

Returns the list of strings representing job templates that were set on this job.

Can be null.

Returns:
the list of strings representing job templates that were set on this job.

getUser

public java.lang.String getUser()

Returns the user that is running the job.

Can be null.

Returns:
the user that is running the job.

getUserPriority

public long getUserPriority()

Returns the user-specified priority for the job.

This priority value, if set, will be used in relation to the user's other jobs.

Returns:
the user-specified priority for the job.

getUtilizedMemorySeconds

public double getUtilizedMemorySeconds()

Returns the number of memory seconds utilized by job.

Returns:
the number of memory seconds utilized by job

getUtilizedProcSeconds

public double getUtilizedProcSeconds()

Returns the number of processor seconds utilized by job

Returns:
the number of processor seconds utilized by job

getVariables

public java.util.Set<Variable> getVariables()

Get the set of variables this job "owns" or sets on completion.

Can return null.

Returns:
the set of variables this job "owns" or sets on completion.

getWallclockRequested

public long getWallclockRequested()

Returns the wallclock requested in seconds.

Returns:
the wallclock requested in seconds.

isDynamic

public boolean isDynamic()

Returns true if the job is dynamic.

This is determined by the JobFlag.DYNAMIC flag being set.

Returns:
if true, the job is dynamic; false, otherwise.

isTemplate

public boolean isTemplate()
Returns whether or not this job object is actually a template description or an actual job.

Returns:
if true, this is a template; if false, it is an actual job.

removeJobRequirement

public void removeJobRequirement(JobRequirement requirement)
Attempts to remove the job requirement from the list of requirements on the job. If the requirement does not exist, the removal request is ignored.

Parameters:
requirement - the requirement to remove from the job.

removeVariable

public void removeVariable(Variable variable)

Removes a variable from the set of variables this job owns.

If the variable is not included in the set, then the remove request is ignored.

Parameters:
variable - the variable to be removed to the set of variables

setAccount

public void setAccount(java.lang.String account)

Sets the account that this job is to run under for billing purposes

Can be null.

Parameters:
account - the account that is billed for running the job.

setActiveDuration

public void setActiveDuration(long activeDuration)
Sets the duration in seconds the job has spent being active or running.

Parameters:
activeDuration - the duration in seconds the job has spent being active or running.

setAllocatedNodes

public void setAllocatedNodes(java.util.Set<JobAllocatedNode> allocatedNodes)

Sets the set of nodes allocated for use by the job to run.

Cannot be null.

Parameters:
allocatedNodes - the set of nodes allocated for use by the job to run.

setBlockReason

public void setBlockReason(JobBlockReason blockReason)

Sets the reason the job is blocked.

Can be null.

Parameters:
blockReason - the reason the job is blocked.

setBypass

public void setBypass(int bypass)
Sets the number of times the job has been backfilled.

Parameters:
bypass - the number of times the job has been backfilled.

setCommandFile

public void setCommandFile(java.lang.String commandFile)

Sets the path to the file that is executed when the job runs.

Can be null.

Parameters:
commandFile - the path to the file that is executed when the job runs.

setCommandLineArguments

public void setCommandLineArguments(java.lang.String commandLineArguments)

Sets the command line arguments passed into running the job.

Can be null.

Parameters:
commandLineArguments - the command line arguments passed into running the job.

setCompletionTime

public void setCompletionTime(java.util.Date completionDate)

Sets the date the job completed.

If null, the job hasn't completed yet.

Parameters:
completionDate - the date the job completed.

setDedicatedProcSeconds

public void setDedicatedProcSeconds(double dedicatedProcSeconds)

Sets the processor seconds dedicated to the job.

Parameters:
dedicatedProcSeconds - the processor seconds dedicated to the job.

setDynamicJobInformation

public void setDynamicJobInformation(DynamicJobInformation jobTemplateExtension)
                              throws java.lang.IllegalArgumentException

Sets the job template and dynamic job information.

Cannot be null.

Parameters:
jobTemplateExtension - the job template and dynamic job information.
Throws:
java.lang.IllegalArgumentException - thrown if jobTemplateExtension is null.

setEarliestStartDate

public void setEarliestStartDate(java.util.Date earliestStartDate)

Sets the system specified earliest start date.

Can be null.

Parameters:
earliestStartDate - the system specified earliest start date.

setEarliestStartDateRequested

public void setEarliestStartDateRequested(java.util.Date earliestStartDateRequested)

Sets the earliest start date that the job requests.

Can be null.

Parameters:
earliestStartDateRequested - the earliest start date that the job requests.

setEffectiveQueueDuration

public void setEffectiveQueueDuration(long effectiveQueueDuration)
Sets the duration in seconds the job has been eligible to run in the queue.

Parameters:
effectiveQueueDuration - the duration in seconds the job has been eligible to run in the queue.

setExpectedState

public void setExpectedState(JobState jobState)
                      throws InvalidMoabArgumentException

Returns the state expected based on scheduler action.

Null cannot be used. Instead JobState.NONE should be used.

Parameters:
jobState - the expected state of the job.
Throws:
InvalidMoabArgumentException - thrown if jobState is null.

setFlags

public void setFlags(JobFlags jobFlags)
              throws InvalidMoabArgumentException

Sets the flags for the job.

Cannot be null.

Parameters:
jobFlags - the flags that apply to the job.
Throws:
InvalidMoabArgumentException - thrown if jobFlags is null.

setGenericAttributes

public void setGenericAttributes(java.util.List<java.lang.String> genericAttributes)

Sets the list of generic attributes the job has requested.

Can be null.

Parameters:
genericAttributes - the list of generic attributes the job has requested.

setGroup

public void setGroup(java.lang.String group)

Sets the group the job is run under.

Can be null.

Parameters:
group - the group the job is run under.

setHolds

public void setHolds(java.util.Set<JobHoldType> holds)

Sets the holds that are currently on the job.

Can be null.

Parameters:
holds - the holds that are currently on the job.

setHostList

public void setHostList(java.util.Set<java.lang.String> hostList)

Sets the set of hosts/nodes the job is running on.

Can be null.

Parameters:
hostList - theset of hosts/nodes the job is running on.

setInitialWorkingDirectory

public void setInitialWorkingDirectory(java.lang.String initialWorkingDirectory)

Sets the path to the directory the job will be started in.

Can be null.

Parameters:
initialWorkingDirectory - the path to the directory the job will be started in.

setJobID

public void setJobID(java.lang.String jobID)

Sets the unique ID for the job.

Can be null.

Parameters:
jobID - the unique ID for the job.

setJobName

public void setJobName(java.lang.String jobName)

Sets the user specified job name.

Can be null.

Parameters:
jobName - the user specified job name.

setLatestCompletedDateRequested

public void setLatestCompletedDateRequested(java.util.Date latestCompletionDateRequested)

Sets the latest date and time the job must be completed by.

Can be null.

Parameters:
latestCompletionDateRequested - the latest date and time the job must be completed by.

setMasterHost

public void setMasterHost(java.lang.String masterHost)

Sets the node/host that the primary task will run on.

Can be null.

Parameters:
masterHost - the node/host that the primary task will run on.

setMemoryRequested

public void setMemoryRequested(int memoryRequested)
Sets the amount of memory in MB requested by the job.

Parameters:
memoryRequested - the amount of memory in MB requested by the job.

setMessages

public void setMessages(java.util.List<java.lang.String> messages)

Sets the list of system set and user specified message.

Can be null.

Parameters:
messages - the list of messages attached to the job.

setNodeCountRequested

public void setNodeCountRequested(int nodeCountRequested)
Sets the number of nodes the job has requested.

Parameters:
nodeCountRequested - the number of nodes the job has requested.

setPartitionAccessList

public void setPartitionAccessList(java.util.Set<java.lang.String> partitionAccessList)

Sets the list of partitions that this job has access to.

Can be null.

Parameters:
partitionAccessList - the list of partitions that this job has access to.

setProcCountRequested

public void setProcCountRequested(int procCountRequested)
Sets the number of processors the job has requested.

Parameters:
procCountRequested - the number of processors the job has requested.

setQos

public void setQos(java.lang.String qos)

Sets the QoS the job is actually running under.

Can be null.

Parameters:
qos - the QoS the job is actually running under.

setQosRequested

public void setQosRequested(java.lang.String qosRequested)

Sets the QoS the job requested.

This may not be the actual QoS the job is given based on policies. Can be null.

Parameters:
qosRequested - the QoS the job requested.

setQueue

public void setQueue(java.lang.String queue)

Sets the class that the job is wanting to or actually running in.

Can be null.

Parameters:
queue - the class that the job is wanting to or actually running in.

setQueueStatus

public void setQueueStatus(QueueStatus queueStatus)
                    throws InvalidMoabArgumentException

Sets the status of the job in its queue.

Cannot be null.

Parameters:
queueStatus - the status of the job in its queue.
Throws:
InvalidMoabArgumentException - thrown if queueStatus is null.

setReservationRequested

public void setReservationRequested(java.lang.String reservationRequested)

Sets the reservation that job requested.

Can be null.

Parameters:
reservationRequested - the reservation that job requested.

setReservationStartDate

public void setReservationStartDate(java.util.Date reservationStartDate)

Sets the actual start date of the reservation the job is running inside of.

Can be null.

Parameters:
reservationStartDate - the actual start date of the reservation the job is running inside of.

setResourceManagerExtension

public void setResourceManagerExtension(java.lang.String resourceManagerExtension)

Sets the resource manager extension String that describes information passed to the the resource manager accounting for the job.

Can be null.

Parameters:
resourceManagerExtension - the resource manager extension String that describes information passed to the the resource manager accounting for the job.

setResourceManagerName

public void setResourceManagerName(java.lang.String resourceManagerName)

Sets the name of the resource manager that is reporting this job.

Can be null.

Parameters:
resourceManagerName - the name of the resource manager that is reporting this job.

setRunPriority

public void setRunPriority(long runPriority)
Sets the priority to start running the job.

Parameters:
runPriority - the priority to start running the job.

setStartCount

public void setStartCount(int startCount)

Sets the number of times this job was started.

Parameters:
startCount - the number of times this job was started.

setStartDate

public void setStartDate(java.util.Date startDate)

Sets the job's actual start time.

Parameters:
startDate - the job's actual start time

setStartPriority

public void setStartPriority(long startPriority)

Sets the effective job priority level.

Parameters:
startPriority - the effective job priority level

setState

public void setState(JobState jobState)
              throws InvalidMoabArgumentException

Sets the job's current state.

Null cannot be used. Instead JobState.NONE should be used.

Parameters:
jobState - the current state of the job.
Throws:
InvalidMoabArgumentException - thrown if jobState is null.

setStdErrorFilePath

public void setStdErrorFilePath(java.lang.String stdErrorFile)
Sets the path to the file containing the standard error output of the job

Parameters:
stdErrorFile - the path to the file containing the job's standard error (STDERR)

setRmStdErrorFilePath

public void setRmStdErrorFilePath(java.lang.String stdErrorFile)
Sets the path to the remote file containing the standard error output of the job

Parameters:
stdErrorFile - the path to the remote file containing the job's standard error (STDERR)

setStdInputFilePath

public void setStdInputFilePath(java.lang.String stdInFilePath)

Sets the path to the file containing the standard input of the job.

Can be null.

Parameters:
stdInFilePath - the path to the file containing the job's standard input (STDIN)

setRmStdInputFilePath

public void setRmStdInputFilePath(java.lang.String stdErrorFile)

Sets the path to the remote file containing the standard input of the job.

Can be null.

Parameters:
stdErrorFile - the path to the remote file containing the job's standard input (STDIN)

setStdOutputFilePath

public void setStdOutputFilePath(java.lang.String stdOutputFile)
Sets the path to the file containing the standard output of the job

Parameters:
stdOutputFile - the path to the file containing the job's standard output (STDOUT)

setRmStdOutputFilePath

public void setRmStdOutputFilePath(java.lang.String rmStdOutputFile)
Sets the path to the remote file containing the standard output of the job

Parameters:
rmStdOutputFile - the path to the remote file containing the job's standard output (STDOUT)

setSubmitDate

public void setSubmitDate(java.util.Date submitDate)

Sets the date this job was submitted.

Parameters:
submitDate - the time this job was submitted.

setSuspendDuration

public void setSuspendDuration(long suspendDuration)

Set the amount of time in seconds the job has been suspended.

Parameters:
suspendDuration - the amount of time the job has been suspended.

setSystemID

public void setSystemID(java.lang.String systemID)

Sets the system ID of the job as reported by an external source.

Can be null.

Parameters:
systemID - the system ID of the job as reported by an external source.

setSystemJobID

public void setSystemJobID(java.lang.String systemJobID)

Sets the job ID according to an external source such as a resource manager.

Can be null.

Parameters:
systemJobID - the job ID according to an external source such as a resource manager.

setSystemPriority

public void setSystemPriority(long systemPriority)

Get the administrator specified system priority level.

Parameters:
systemPriority - the administrator specified system priority level

setTemplate

public void setTemplate(boolean isTemplate)
Sets whether or not this job object is actually a template description or an actual job.

Parameters:
isTemplate - if true, this is a template; if false, it is an actual job.

setTemplateMatchList

public void setTemplateMatchList(java.util.List<java.lang.String> templateMatchList)

Sets the list of templates that match this job.

Can be null.

Parameters:
templateMatchList - the list of templates that match this job.

setTemplateSetList

public void setTemplateSetList(java.util.List<java.lang.String> templateSetList)

Sets the list of template sets that are applied to this job.

Can be null.

Parameters:
templateSetList - the list of template sets that are applied to this job.

setUser

public void setUser(java.lang.String user)

Sets the user running the job.

Can be null.

Parameters:
user - the user running the job.

setUserPriority

public void setUserPriority(long userPriority)

Sets the priority as specified by the user.

This is different than the job's system wide priority.

Parameters:
userPriority - the priority as specified by the user.

setUtilizedMemorySeconds

public void setUtilizedMemorySeconds(double utilizedMemorySeconds)

Sets the memory seconds utilized by the job.

Parameters:
utilizedMemorySeconds - the memory seconds utilized by the job

setUtilizedProcSeconds

public void setUtilizedProcSeconds(double utilizedProcSeconds)

Sets the processor seconds utilized by the job.

Parameters:
utilizedProcSeconds - the processor seconds utilized by the job.

setVariables

public void setVariables(java.util.Set<Variable> variables)

Sets the set of variables this job "owns" or sets on completion.

Can be null.

Parameters:
variables - the set of variables this job "owns" or sets on completion.

setWallclockRequested

public void setWallclockRequested(long wallclockRequested)
Sets the wallclock the job requested in seconds.

Parameters:
wallclockRequested - the wallclock the job requested in seconds.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getNotifyTypeList

public java.util.Set<JobEmailNotifyType> getNotifyTypeList()

Returns the set of e-mail notify types attached to the job.

Can be null.

Returns:
the set of e-mail notify types attached to the job.

setNotifyTypeList

public void setNotifyTypeList(java.util.Set<JobEmailNotifyType> notifyTypeList)

Sets the set of e-mail notify types attached to the job.

Can be null.

Parameters:
notifyTypeList - the set of e-mail notify types attached to the job.

getSLAViolationValue

public double getSLAViolationValue()

Returns the worst-case violation of a job's target SLA information as reported in a percentage.

Looking at the four target ranges of a dynamic job, this will return a negative percentage if the actual value is lower than the minimum target. Similarly, it will return a postive percentage if the actual value is higher than maximum target. If no values are outside the targets or the SLA targets are not used, then 0 is returned.

Returns:
the worst-case violation of the job's target SLA information as reported as a percentage.

getSLAViolationType

public SLAViolationType getSLAViolationType()

Returns the worst-case violation of a job's target SLA information as reported in a violation type category.

Returns:
the worst-case violation of the job's target SLA information as reported as a violation type category.

getJobDependecyList

public java.util.List<JobDependency> getJobDependecyList()

Returns the list of dependencies for this job.

Can be null.

Returns:
the list of dependencies for this job.

setJobDependecyList

public void setJobDependecyList(java.util.List<JobDependency> jobDependecyList)

Sets the list of dependencies for this job.

Can be null.

Parameters:
jobDependecyList - the list of dependencies for this job.

getGenericResourcesList

public java.util.List<GenericResource> getGenericResourcesList()
get the generic resource list

Returns:
genericResourceList

setGenericResourcesList

public void setGenericResourcesList(java.util.List<GenericResource> genericResourcesList)
Set the new generic resource list.

Parameters:
genericResourcesList -

addGenericResource

public void addGenericResource(GenericResource genericResource)
Add a new generic resource to the generic resource list.

Parameters:
genericResource -

setVMUsagePolicy

public void setVMUsagePolicy(VMUsagePolicy vmUsagePolicy)
Sets the requested virtual machine usage policy for the job.

Parameters:
vmUsagePolicy - the requested VM usage policy

getVMUsagePolicy

public VMUsagePolicy getVMUsagePolicy()
Returns the requested virtual machine usage policy for the job.

Returns:
the requested virtual machine usage policy for the job.


Copyright © 2001-2009 Cluster Resources, Inc. All Rights Reserved.