public class ClustererFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_PACKAGE_NAME
The default package where all the implementations reside.
|
static java.lang.String |
HORIZONTAL_CLUSTERING_CLASS
The name of the class implementing horizontal clustering.
|
private static java.lang.String |
LABEL_CLUSTERING_TYPE
The type corresponding to label based clustering.
|
private static java.util.Map |
mClustererTable
The table that maps a clustering technique to a clustering impelemntation.
|
private static java.util.Map |
mPartitionerTable
The table that maps clustering technique to a partitioner.
|
static java.lang.String |
VERTICAL_CLUSTERING_CLASS
The name of the class implementing vertical clustering.
|
Constructor and Description |
---|
ClustererFactory() |
Modifier and Type | Method and Description |
---|---|
private static java.util.Map |
clustererTable()
Returns a table that maps, the clustering technique to an appropriate
class implementing that clustering technique.
|
static Clusterer |
loadClusterer(ADag dag,
PegasusBag bag,
java.lang.String type)
Loads the appropriate clusterer on the basis of the clustering type
specified in the options passed to the planner.
|
static Partitioner |
loadPartitioner(PegasusProperties properties,
java.lang.String type,
GraphNode root,
java.util.Map graph)
Loads the appropriate partitioner on the basis of the clustering type
specified in the options passed to the planner.
|
private static java.util.Map |
partitionerTable()
Returns a table that maps, the clustering technique to an appropriate
partitioning technique.
|
public static final java.lang.String DEFAULT_PACKAGE_NAME
public static final java.lang.String HORIZONTAL_CLUSTERING_CLASS
public static final java.lang.String VERTICAL_CLUSTERING_CLASS
private static final java.lang.String LABEL_CLUSTERING_TYPE
private static java.util.Map mPartitionerTable
private static java.util.Map mClustererTable
public static Partitioner loadPartitioner(PegasusProperties properties, java.lang.String type, GraphNode root, java.util.Map graph) throws ClustererFactoryException
properties
- the PegasusProperties
object containing all
the properties required by Pegasus.type
- type of clustering to be used.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.ClustererFactoryException
- that nests any error that
might occur during the instantiationDEFAULT_PACKAGE_NAME
public static Clusterer loadClusterer(ADag dag, PegasusBag bag, java.lang.String type) throws ClustererFactoryException
dag
- the workflow being clustered.bag
- the bag of initialization objects.type
- type of clustering to be used.ClustererFactoryException
- that nests any error that
might occur during the instantiationDEFAULT_PACKAGE_NAME
private static java.util.Map clustererTable()
private static java.util.Map partitionerTable()