|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.peace_tools.workspace.JobBase
org.peace_tools.workspace.Job
public class Job
This class corresponds to a "Job" element in a PEACE work space XML data. This class encapsulates the core information associated with a Job. This class serves merely as a read-only type class that is created when a new job is run. The data is persisted in the XML work space for future reference so that users can determine jobs that were scheduled and check on status of long-running jobs.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.peace_tools.workspace.JobBase |
---|
JobBase.JobStatusType |
Field Summary | |
---|---|
private int |
cpusPerNode
The number of CPUS per Nodes (on a cluster) that were requested for running this job. |
private java.lang.String |
description
A user defined description for this job. |
private java.util.ArrayList<Filter> |
filters
The list of filters configured by the user for this job. |
private java.util.ArrayList<Heuristic> |
heuristics
The list of heuristics configured by the user for this job. |
private javax.xml.datatype.XMLGregorianCalendar |
lastUpdateTimestamp
The time stamp value of the last time the status of this job was updated. |
private int |
maxRunTime
The total wall clock run time to be reserved for this job when submitting via a PBS system. |
private int |
memory
The peak memory to be reserved for this job when submitting via a PBS system. |
private java.lang.Thread |
monitor
A transient (not persistent) reference to the monitor thread for this job (if any). |
private int |
nodes
The number of nodes on a cluster that were requested for running this job. |
private java.lang.String |
path
The path to the directory on the server (may it be local or remote) where the files corresponding to this job are stored. |
private int[] |
progressInfo
A transient (not persisted) progress information about the job. |
private javax.xml.datatype.XMLGregorianCalendar |
startTimestamp
The time when this job was actually created and queued to run on a server. |
Fields inherited from class org.peace_tools.workspace.JobBase |
---|
jobID, runtime, serverID, status |
Constructor Summary | |
---|---|
Job(java.lang.String jobID,
java.lang.String description,
java.lang.String serverID,
java.lang.String path,
int nodes,
int cpusPerNode,
int memory,
int maxRunTime,
java.util.ArrayList<Heuristic> heuristics,
java.util.ArrayList<Filter> filters)
Constructor to create a Job object with the fixed value fields initialized to specific values. |
Method Summary | |
---|---|
static Job |
create(org.w3c.dom.Element jobNode)
Helper method to utilize data from a DOM tree to create a suitable Job entry. |
int |
getCPUsPerNode()
Obtain the number of CPUs on each node that were requested for running this job. |
java.lang.String |
getDescription()
Obtain the user supplied description for this this job. |
java.util.ArrayList<Filter> |
getFilterList()
Obtain the list of filters that were used to improve quality of clustering. |
java.lang.String |
getFiltersCmdLine()
Command line for PEACE clustering engine to configure filters. |
java.util.ArrayList<Heuristic> |
getHeuristicList()
Obtain the list of heuristics that were used to accelerate the process of constructing the MST. |
java.lang.String |
getHeuristicsCmdLine()
Command line for PEACE clustering engine to configure heuristics. |
javax.xml.datatype.XMLGregorianCalendar |
getLastUpdateTimestamp()
Returns the last time the status of this job was set/changed. |
int |
getMaxRunTime()
Obtain the total time to be requested for this job. |
int |
getMemory()
Obtain the memory to be requested for this job. |
java.lang.Thread |
getMonitor()
Obtain the job monitoring thread (if any) |
int |
getNodes()
Obtain the number of nodes that were requested for running this job. |
java.lang.String |
getPath()
Obtain the system generated directory where the output files for this job are stored on the server. |
int[] |
getProgressInfo()
Obtain the current progress information status for this job. |
javax.xml.datatype.XMLGregorianCalendar |
getStartTimestamp()
Obtain the timestamp indicating when the job actually started running on the server. |
void |
marshall(org.w3c.dom.Element jobList)
Method to marshall the data stored in this object to become part of a DOM tree element passed in. |
void |
marshall(java.io.PrintWriter out)
Method to marshall the data stored in this object directly to a XML fragment. |
private static java.util.ArrayList<Filter> |
parseFilterChain(org.w3c.dom.Element jobNode)
Helper method to unmarshall the filter list into an in-memory array list. |
private static java.util.ArrayList<Heuristic> |
parseHeuristicChain(org.w3c.dom.Element jobNode)
Helper method to unmarshall the heuristic list into an in-memory array list. |
void |
setDescription(java.lang.String desc)
Set a description for this job. |
private void |
setLastUpdateTime()
This is a helper method that is used to set the lastUpdateTimestamp to the current system time. |
void |
setMonitor(java.lang.Thread monitor)
Set the monitoring thread for this Job. |
void |
setPath(java.lang.String path)
Set the path where the files for this job are located. |
void |
setProgress(int estsAnalyzed,
int totalEstCount)
Set the progress status for this job. |
void |
setStartTimestamp(java.util.GregorianCalendar timestamp)
This method can be used to explicitly set the time stamp when this job actually started running on the server. |
void |
setStatus(JobBase.JobStatusType status)
Change the status for this job. |
java.lang.String |
toCmdLine()
Return the information in the form of a partial PEACE command line parameter. |
java.lang.String |
toString()
|
Methods inherited from class org.peace_tools.workspace.JobBase |
---|
getJobID, getRunTime, getServerID, getStatus, isDone, setRunTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.String description
private java.lang.String path
private int nodes
private int cpusPerNode
private int memory
private int maxRunTime
private javax.xml.datatype.XMLGregorianCalendar startTimestamp
private javax.xml.datatype.XMLGregorianCalendar lastUpdateTimestamp
private java.util.ArrayList<Heuristic> heuristics
private java.util.ArrayList<Filter> filters
private transient int[] progressInfo
private transient java.lang.Thread monitor
Constructor Detail |
---|
public Job(java.lang.String jobID, java.lang.String description, java.lang.String serverID, java.lang.String path, int nodes, int cpusPerNode, int memory, int maxRunTime, java.util.ArrayList<Heuristic> heuristics, java.util.ArrayList<Filter> filters)
jobID
- The workspace-wide unique, generated job ID for this job.
The jobID is generated via a call to JobList.reserveJobID() method.
This is a valid string (typically in the form job####)description
- A user-supplied description for this job entry. This
maybe an empty string (but cannot be null).serverID
- The ID of the server on which this job is running.
This is a cross reference ID of a Server configured in this workspace.path
- The directory on the server where the data for this job is stored.nodes
- The number of compute nodes that were requested on a cluster for
running this job. This value must be at least 1.cpusPerNode
- The number of CPUs on each node that were requested for this
job. This value must be at least 1.memory
- The total memory (sum of all memory used by all processes, in MB)
that was allocated for this job.maxRunTime
- The maximum runtime (in hours) that was assigned for this job.heuristics
- The list of heuristics that were used to accelerate
the MST generation algorithm.filters
- The list of filters that were used to filter out short ESTs or
ESTs with low complexity sections to ensure that the resultant clustering is
high quality.Method Detail |
---|
public static Job create(org.w3c.dom.Element jobNode) throws java.lang.Exception
jobNode
- The DOM element to be used for creating the Job
entry and populating with the needed data.
java.lang.Exception
- This method throws an exception when errors occur
during reading and processing elements from the DOM node.private static java.util.ArrayList<Heuristic> parseHeuristicChain(org.w3c.dom.Element jobNode) throws java.lang.Exception
jobNode
- The top-level job node from where the heuristic chain element
is to be extracted and processed.
java.lang.Exception
- This method throws an exception when errors occur
during reading and processing elements from the DOM node.private static java.util.ArrayList<Filter> parseFilterChain(org.w3c.dom.Element jobNode) throws java.lang.Exception
jobNode
- The top-level job node from where the filter chain element
is to be extracted and processed.
java.lang.Exception
- This method throws an exception when errors occur
during reading and processing elements from the DOM node.public java.lang.String getDescription()
public void setDescription(java.lang.String desc)
desc
- public java.lang.String getPath()
public void setPath(java.lang.String path)
path
- The path where the files for this job are
located.public int getNodes()
public int getCPUsPerNode()
public int getMemory()
public int getMaxRunTime()
private void setLastUpdateTime()
public void setStatus(JobBase.JobStatusType status)
setStatus
in class JobBase
status
- The new status value to be set for this job.public javax.xml.datatype.XMLGregorianCalendar getLastUpdateTimestamp()
public void setStartTimestamp(java.util.GregorianCalendar timestamp)
timestamp
- The timestamp when the job actually started running
on the server. This information is typically determined from the output
logs generated by the job.public javax.xml.datatype.XMLGregorianCalendar getStartTimestamp()
public java.lang.String getHeuristicsCmdLine()
This method can be used to obtain the heuristic information in the form of command line parameters that can be readily passed to the PEACE clustering engine. The command line parameters are used to configure the clustering engine to suit the configuration setup by the user for this job.
Note: The return value of this method must be ignored if this call is being made in conjunction with the two pass d2 analyzer.
public java.lang.String getFiltersCmdLine()
public java.lang.String toCmdLine()
public void setProgress(int estsAnalyzed, int totalEstCount)
estsAnalyzed
- The number of ESTs that have been analyzed.totalEstCount
- The total number of ESTs to be analyzed.public int[] getProgressInfo()
Note: The progress information returned may be -1, -1 if the progress information is not known.
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.ArrayList<Heuristic> getHeuristicList()
public java.util.ArrayList<Filter> getFilterList()
public final void marshall(org.w3c.dom.Element jobList)
jobList
- The DOM element corresponding to the "JobList"
node that contains this entry.public final void marshall(java.io.PrintWriter out)
out
- The stream to which the XML must be serialized.public void setMonitor(java.lang.Thread monitor)
monitor
- The monitoring thread for this job. If this
parameter is null, then the job monitor thread is cleared.public java.lang.Thread getMonitor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |