|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.griphyn.cPlanner.partitioner.Partitioner
org.griphyn.cPlanner.partitioner.BFS
public class BFS
This does a modified breadth first search of the graph to identify the levels. A node is put in a level only if all the parents of that node are already assigned a level.
| Field Summary | |
|---|---|
static String |
DESCRIPTION
A short description about the partitioner. |
private int |
mCurrentDepth
The current depth of the nodes that are being traversed in the BFS. |
private LinkedList |
mQueue
The first in first out queue, that manages the set of gray vertices in a breadth first search. |
| Fields inherited from class org.griphyn.cPlanner.partitioner.Partitioner |
|---|
mGraph, mLogger, mProps, mRoot, PACKAGE_NAME, VERSION |
| Constructor Summary | |
|---|---|
BFS(GraphNode root,
Map graph,
PegasusProperties properties)
The overloaded constructor. |
|
| Method Summary | |
|---|---|
protected void |
constructLevelRelations(Callback c,
int parent,
int child)
Calls out to the callback with appropriate relations between the partitions constructed for the levels. |
protected void |
constructPartitions(Callback c,
List nodes,
int level)
Given a list of jobs, constructs (one or more) partitions out of it. |
String |
description()
Returns a textual description of the transfer implementation. |
void |
determinePartitions(Callback c)
Does a constrained breadth first search to identify the partitions, and calls out to write out the partition graph. |
protected void |
done(Callback c)
Indicates that we are done with the partitioning. |
private String |
getPartitionID(int level)
Constructs the id for the partition. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DESCRIPTION
private LinkedList mQueue
private int mCurrentDepth
| Constructor Detail |
|---|
public BFS(GraphNode root,
Map graph,
PegasusProperties properties)
root - the dummy root node of the graph.graph - the map containing all the nodes of the graph keyed by
the logical id of the nodes.properties - the properties passed to the planner.| Method Detail |
|---|
public void determinePartitions(Callback c)
determinePartitions in class Partitionerc - the callback for the partitioner.public String description()
description in class Partitioner
protected void constructPartitions(Callback c,
List nodes,
int level)
c - the parititoner callbacknodes - the list of GraphNode objects on a particular level.level - the level as determined from the root of the workflow.
protected void constructLevelRelations(Callback c,
int parent,
int child)
c - the parititoner callbackparent - the parent levelchild - the child level.protected void done(Callback c)
private String getPartitionID(int level)
level - the depth from the root of the graph.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||