edu.isi.pegasus.planner.partitioner

## Class Partitioner

- java.lang.Object
- - edu.isi.pegasus.planner.partitioner.Partitioner

Direct Known Subclasses:
  BFS, Label, One2One, Whole

    public abstract class Partitioner
    extends java.lang.Object

The abstract class that lays out the api to do the partitioning of the dax into smaller daxes. It defines additional functions to get and set the name of the partitions etc.

Version:
  $Revision$
Author:
  Karan Vahi

### Field Summary

Fields
`protected java.util.Map` `mGraph` The map containing all the graph nodes.
`protected LogManager` `mLogger` The handle to the internal logging object.
`protected PegasusProperties` `mProps` The object holding all the properties pertaining to Pegasus.
`protected GraphNode` `mRoot` The root node of the graph from where to start the BFS.
`static java.lang.String` `PACKAGE_NAME` The package name where the implementing classes of this interface reside.
`static java.lang.String` `VERSION` The version number associated with this API of Code Generator.

### Constructor Summary

Constructors
Constructor and Description
`Partitioner(GraphNode root, java.util.Map graph, PegasusProperties properties)` The overloaded constructor.

### Method Summary

All Methods Instance Methods Abstract Methods
`abstract java.lang.String` `description()` Returns a textual description of the transfer implementation.
`abstract void` `determinePartitions(Callback c)` The main function that ends up traversing the graph structure corrsponding to the dax and creates the smaller dax files(one dax file per partition) and the .pdax file that illustrates the partition graph.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### PACKAGE_NAME

    public static final java.lang.String PACKAGE_NAME

The package name where the implementing classes of this interface reside.

See Also:
  Constant Field Values

#### VERSION

    public static final java.lang.String VERSION

The version number associated with this API of Code Generator.

See Also:
  Constant Field Values

#### mRoot

    protected GraphNode mRoot

The root node of the graph from where to start the BFS.

#### mGraph

    protected java.util.Map mGraph

The map containing all the graph nodes. The key to the map are the logical id's of the jobs as identified in the dax and the values are the corresponding Graph Node objects.

#### mLogger

    protected LogManager mLogger

The handle to the internal logging object.

#### mProps

    protected PegasusProperties mProps

The object holding all the properties pertaining to Pegasus.

### Constructor Detail

#### Partitioner

    public Partitioner(GraphNode root,
                       java.util.Map graph,
                       PegasusProperties properties)

The overloaded constructor.

Parameters:
  `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 out to the planner.

### Method Detail

#### determinePartitions

    public abstract void determinePartitions(Callback c)

The main function that ends up traversing the graph structure corrsponding to the dax and creates the smaller dax files(one dax file per partition) and the .pdax file that illustrates the partition graph. It is recommended that the implementing classes use the already initialized handles to the DAXWriter and PDAXWriter interfaces to write out the xml files. The advantage of using these preinitialized handles is that they already are correctly configured for the directories where Pegasus expects the submit files and dax files to reside.

Parameters:
  `c` - the callback object that the partitioner calls out to.

#### description

    public abstract java.lang.String description()

Returns a textual description of the transfer implementation.

Returns:
  a short textual description