edu.isi.pegasus.planner.partitioner
public class Horizontal extends BFS
pegasus.partitioner.horizontal.collapse.[txName] pegasus.partitioner.horizontal.bundle.[txName]The bundle value designates the number of partitions per transformation per level. The collapse values designates the number of nodes in a partitioning referring to a particular transformation. If both are specified, then bundle value takes precedence.
Modifier and Type | Class and Description |
---|---|
private static class |
Horizontal.GraphNodeComparator
A GraphNode comparator, that allows us to compare nodes according to the
transformation logical names.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_COLLAPSE_FACTOR
The default collapse factor for collapsing jobs with same logical name
scheduled onto the same execution pool.
|
static String |
DESCRIPTION
A short description about the partitioner.
|
private int |
mIDCounter
The global counter that is used to assign ID's to the partitions.
|
private Horizontal.GraphNodeComparator |
mNodeComparator
A static instance of GraphNode comparator.
|
private Map |
mPartitionMap
A map indexed by the partition ID.
|
mGraph, mLogger, mProps, mRoot, PACKAGE_NAME, VERSION
Constructor and Description |
---|
Horizontal(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.
|
protected void |
constructPartitions(Callback c,
List nodes,
int level,
String name)
Given a list of jobs, constructs (one or more) partitions out of it.
|
protected Partition |
createPartition(List nodes)
Creates a partition out of a list of nodes.
|
String |
description()
Returns a textual description of the partitioner implementation.
|
protected void |
done(Callback c)
Indicates that we are done with the traversal of the graph.
|
protected int[] |
getCollapseFactor(String txName,
int size)
Returns the collapse factor, that is used to determine the number of nodes
going in a partition.
|
private String |
getPartitionID(int id)
Constructs the id for the partition.
|
private int |
idCounter()
Returns the current value of the ID counter.
|
private void |
incrementIDCounter()
Increments the ID counter by 1.
|
private Comparator |
nodeComparator()
Singleton access to the job comparator.
|
determinePartitions
public static final String DESCRIPTION
public static final int DEFAULT_COLLAPSE_FACTOR
private Map mPartitionMap
private Horizontal.GraphNodeComparator mNodeComparator
private int mIDCounter
public Horizontal(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.private Comparator nodeComparator()
public String description()
description
in class BFS
protected void constructPartitions(Callback c, List nodes, int level)
constructPartitions
in class BFS
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 constructPartitions(Callback c, List nodes, int level, String name)
c
- the parititoner callbacknodes
- the list of GraphNode
objects on a particular level,
referring to the same transformation underneath.level
- the level as determined from the root of the workflow.name
- the transformation nameprotected void constructLevelRelations(Callback c, int parent, int child)
constructLevelRelations
in class BFS
c
- the parititoner callbackparent
- the parent levelchild
- the child level.done( Callback )
protected void done(Callback c)
protected int[] getCollapseFactor(String txName, int size)
txName
- the logical transformation namesize
- the number of jobs that refer to the same logical
transformation and are scheduled on the same execution pool.protected Partition createPartition(List nodes)
nodes
- the list of GraphNodes
making the partition.private void incrementIDCounter()
private int idCounter()
private String getPartitionID(int id)
id
- an integer ID.