edu.isi.pegasus.planner.partitioner
public class BFS extends Partitioner
Modifier and Type | Field and Description |
---|---|
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.
|
mGraph, mLogger, mProps, mRoot, PACKAGE_NAME, VERSION
Constructor and Description |
---|
BFS(GraphNode root,
Map graph,
PegasusProperties properties)
The overloaded constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public static final String DESCRIPTION
private LinkedList mQueue
private int mCurrentDepth
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.public void determinePartitions(Callback c)
determinePartitions
in class Partitioner
c
- 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.