public class ADag extends Data
Modifier and Type | Field and Description |
---|---|
DagInfo |
dagInfo
The DagInfo object which contains the information got from parsing the
dax file.
|
protected Notifications |
mNotifications
All the notifications associated with the job
|
protected ReplicaStore |
mReplicaStore
Handle to the replica store that stores the replica catalog
user specifies in the DAX
|
private String |
mRequestID
The optional request ID associated with the DAX.
|
protected String |
mRootWorkflowUUID
The Root Workflow UUID.
|
private String |
mSubmitDirectory
The root of the submit directory hierarchy for the DAG.
|
protected TransformationStore |
mTransformationStore
Handle to the transformation store that stores the transformation catalog
user specifies in the DAX
|
protected boolean |
mWorkflowRefinementStarted
Boolean indicating whether the refinement process on the workflow has
started or not.
|
protected String |
mWorkflowUUID
The UUID associated with the workflow.
|
Vector |
vJobSubInfos
Vector of
Job objects. |
Constructor and Description |
---|
ADag()
Initialises the class member variables.
|
ADag(DagInfo dg,
Vector vSubs)
Overloaded constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Job 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 |
addNotification(Invoke invoke)
Adds a Invoke object correpsonding to a notification.
|
void |
addNotifications(Notifications invokes)
Adds all the notifications passed to the underlying container.
|
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.
|
protected String |
generateWorkflowUUID()
Generates the UUID for the workflow
|
String |
getAbstractWorkflowName()
Returns the workflow id
|
String |
getBaseSubmitDirectory()
Returns the root of submit directory hierarchy for the workflow.
|
Vector |
getChildren(String node)
Get all the children of a particular node.
|
String |
getDAXVersion()
Returns the dax version
|
String |
getExecutableWorkflowName()
Returns the workflow id
|
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. |
Notifications |
getNotifications()
Returns all the notifications associated with the job.
|
Collection<Invoke> |
getNotifications(Invoke.WHEN when)
Returns a collection of all the notifications that need to be
done for a particular condition
|
Vector |
getParents(String node)
Gets all the parents of a particular node
|
ReplicaStore |
getReplicaStore()
Returns the Replica Store
|
String |
getRequestID()
Returns the request id.
|
Vector |
getRootNodes()
It determines the root Nodes for the ADag looking at the relation pairs
of the adag.
|
String |
getRootWorkflowUUID()
Returns the UUID for the Root workflow
|
Job |
getSubInfo(String job)
This returns a Job object corresponding to the job by looking through
all the subInfos.
|
TransformationStore |
getTransformationStore()
Returns the Transformation Store
|
WorkflowMetrics |
getWorkflowMetrics()
Returns the metrics about the workflow.
|
String |
getWorkflowUUID()
Returns the UUID for the workflow
|
boolean |
hasWorkflowRefinementStarted()
Returns a boolean indicating whether the workflow refinement has started
or not
|
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(Job job)
Removes a particular job from the workflow.
|
void |
resetStores()
Resets the replica and transformation stores;
|
void |
setBaseSubmitDirectory(String dir)
Sets the submit directory for the workflow.
|
void |
setReplicaStore(ReplicaStore store)
Sets the Replica Store
|
void |
setRequestID(String id)
Sets the request id.
|
void |
setRootWorkflowUUID(String uuid)
Sets the root UUID for the workflow
|
void |
setTransformationStore(TransformationStore store)
Sets the Transformation Store
|
void |
setWorkflowRefinementStarted(boolean state)
Sets whether the workflow refinement has started or not
|
void |
setWorkflowUUID(String uuid)
Sets the UUID for the workflow
|
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.
|
setToString, vectorToString
public DagInfo dagInfo
public Vector vJobSubInfos
Job
objects. Each Job object contains
information corresponding to the submit file for one job.private String mSubmitDirectory
private String mRequestID
protected ReplicaStore mReplicaStore
protected TransformationStore mTransformationStore
protected String mRootWorkflowUUID
protected String mWorkflowUUID
protected boolean mWorkflowRefinementStarted
protected Notifications mNotifications
public void addNotification(Invoke invoke)
invoke
- the invoke object containing the notificationpublic void addNotifications(Notifications invokes)
invokes
- the notifications to be addedpublic Collection<Invoke> getNotifications(Invoke.WHEN when)
when
- the conditionpublic Notifications getNotifications()
public void resetStores()
public Object clone()
public String getRootWorkflowUUID()
public void setRootWorkflowUUID(String uuid)
uuid
- the UUID of the workflowpublic String getWorkflowUUID()
public void setWorkflowUUID(String uuid)
uuid
- the UUID of the workflowprotected String generateWorkflowUUID()
public boolean hasWorkflowRefinementStarted()
public void setWorkflowRefinementStarted(boolean state)
state
- the boolean valuepublic String toString()
public void add(Job job)
job
- the new job that is to be added to the ADag.public void clearJobs()
public boolean isEmpty()
public boolean remove(Job job)
job
- the Job
object containing the job description.public int getNoOfJobs()
dagJobs
Vector.public void setRequestID(String id)
id
- the request id.public String getRequestID()
public String getAbstractWorkflowName()
public String getExecutableWorkflowName()
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 pairorg.griphyn.cPlanner.classes.PCRelation
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.org.griphyn.cPlanner.classes.PCRelation
public void setBaseSubmitDirectory(String dir)
dir
- the submit directory.public String getLabel()
public String getDAXVersion()
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.org.griphyn.cPlanner.classes.PCRelation
,
org.griphyn.cPlanner.classes.DagInfo#relations
public Set getExecutionSites()
public void setReplicaStore(ReplicaStore store)
store
- the Replica Storepublic ReplicaStore getReplicaStore()
public void setTransformationStore(TransformationStore store)
store
- the Transformation Storepublic TransformationStore getTransformationStore()
public Vector getRootNodes()
org.griphyn.cPlanner.classes.PCRelation
,
org.griphyn.cPlanner.classes.DagInfo#relations
public Iterator jobIterator()
public Job getSubInfo(String job)
job
- jobName of the job for which we need the subInfo object.Job
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.Copyright © 2011 The University of Southern California. All Rights Reserved.