|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.griphyn.cPlanner.classes.Data
org.griphyn.cPlanner.classes.ADag
public class ADag
This class object contains the info about a Dag. DagInfo object contains the information to create the .dax file. vJobSubInfos is a Vector containing SubInfo objects of jobs making the Dag. Each subinfo object contains information needed to generate a submit file for that job.
DagInfo,
SubInfo| Field Summary | |
|---|---|
DagInfo |
dagInfo
The DagInfo object which contains the information got from parsing the dax file. |
private String |
mRequestID
The optional request ID associated with the DAX. |
private String |
mSubmitDirectory
The root of the submit directory hierarchy for the DAG. |
Vector |
vJobSubInfos
Vector of SubInfo objects. |
| Fields inherited from class org.griphyn.cPlanner.classes.Data |
|---|
mLogger, mLogMsg |
| Constructor Summary | |
|---|---|
ADag()
Initialises the class member variables. |
|
ADag(DagInfo dg,
Vector vSubs)
Overloaded constructor. |
|
| Method Summary | |
|---|---|
void |
add(SubInfo job)
This adds a new job to the ADAG object. |
void |
addNewRelation(String parent,
String child)
Adds a new PCRelation pair to the Vector of PCRelation
pairs. |
void |
addNewRelation(String parent,
String child,
boolean isDeleted)
Adds a new PCRelation pair to the Vector of PCRelation
pairs. |
void |
clearJobs()
Removes all the jobs from the workflow, and all the edges between the workflows. |
Object |
clone()
Returns a new copy of the Object. |
String |
getBaseSubmitDirectory()
Returns the root of submit directory hierarchy for the workflow. |
Vector |
getChildren(String node)
Get all the children of a particular node. |
Set |
getExecutionSites()
It returns the a unique list of the execution sites that the Planner has mapped the dax to so far in it's stage of planning . |
String |
getLabel()
Returns the label of the workflow, that was specified in the DAX. |
Vector |
getLeafNodes()
Returns all the leaf nodes of the dag. |
String |
getMTime()
Returns the last modified time for the file containing the workflow description. |
int |
getNoOfJobs()
Returns the number of jobs in the dag on the basis of number of elements in the dagJobs Vector. |
Vector |
getParents(String node)
Gets all the parents of a particular node |
String |
getRequestID()
Returns the request id. |
Vector |
getRootNodes()
It determines the root Nodes for the ADag looking at the relation pairs of the adag. |
SubInfo |
getSubInfo(String job)
This returns a SubInfo object corresponding to the job by looking through all the subInfos. |
WorkflowMetrics |
getWorkflowMetrics()
Returns the metrics about the workflow. |
boolean |
isEmpty()
Returns whether the workflow is empty or not. |
Iterator |
jobIterator()
Returns an iterator for traversing through the jobs in the workflow. |
boolean |
remove(SubInfo job)
Removes a particular job from the workflow. |
void |
setBaseSubmitDirectory(String dir)
Sets the submit directory for the workflow. |
void |
setRequestID(String id)
Sets the request id. |
String |
toDOT()
Returns the DOT description of the object. |
void |
toDOT(Writer stream,
String indent)
Returns the DOT description of the object. |
String |
toString()
Returns the String description of the dag associated with this object. |
void |
writeDOTHeader(Writer stream,
String indent)
Writes out the static DOT Header. |
| Methods inherited from class org.griphyn.cPlanner.classes.Data |
|---|
setToString, vectorToString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public DagInfo dagInfo
public Vector vJobSubInfos
SubInfo objects. Each SubInfo object contains
information corresponding to the submit file for one job.
private String mSubmitDirectory
private String mRequestID
| Constructor Detail |
|---|
public ADag()
public ADag(DagInfo dg,
Vector vSubs)
dg - the DagInfovSubs - the jobs in the workflow.| Method Detail |
|---|
public Object clone()
clone in class Objectpublic String toString()
toString in class Datapublic void add(SubInfo job)
job - the new job that is to be added to the ADag.public void clearJobs()
public boolean isEmpty()
public boolean remove(SubInfo job)
job - the SubInfo object containing the job description.
public int getNoOfJobs()
dagJobs Vector.
public void setRequestID(String id)
id - the request id.public String getRequestID()
public void addNewRelation(String parent,
String child)
PCRelation
pairs. For the new relation the isDeleted parameter is set to false.
parent - The parent in the relation pairchild - The child in the relation pairPCRelation
public void addNewRelation(String parent,
String child,
boolean isDeleted)
PCRelation
pairs.
parent - The parent in the relation pairchild - The child in the relation pairisDeleted - Whether the relation has been deleted due to the reduction
algorithm or not.PCRelationpublic void setBaseSubmitDirectory(String dir)
dir - the submit directory.public String getLabel()
public String getMTime()
public String getBaseSubmitDirectory()
public Vector getParents(String node)
node - the name of the job whose parents are to be found.
public Vector getChildren(String node)
node - the name of the node whose children we want to find.
public Vector getLeafNodes()
String corresponding to the job names of
the leaf nodes.PCRelation,
DagInfo.relationspublic Set getExecutionSites()
public Vector getRootNodes()
PCRelation,
DagInfo.relationspublic Iterator jobIterator()
public SubInfo getSubInfo(String job)
job - jobName of the job for which we need the subInfo object.
SubInfo objects corresponding to the jobpublic WorkflowMetrics getWorkflowMetrics()
public String toDOT()
throws IOException
IOException - if something fishy happens to the stream.
public void toDOT(Writer stream,
String indent)
throws IOException
stream - is a stream opened and ready for writing. This can also
be a StringWriter for efficient output.indent - is a String of spaces used for pretty
printing. The initial amount of spaces should be an empty
string. The parameter is used internally for the recursive
traversal.
IOException - if something fishy happens to the stream.
public void writeDOTHeader(Writer stream,
String indent)
throws IOException
stream - is a stream opened and ready for writing. This can also
be a StringWriter for efficient output.indent - is a String of spaces used for pretty
printing. The initial amount of spaces should be an empty
string. The parameter is used internally for the recursive
traversal.
IOException - if something fishy happens to the stream.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||