| java.lang.Object org.griphyn.cPlanner.partitioner.WriterCallback
WriterCallback | public class WriterCallback implements Callback(Code) | | This callback writes out a DAX file for each of the partitions,
and also writes out a PDAX file that captures the relations
between the partitions.
author: not attributable version: $Revision: 464 $ |
Method Summary | |
public void | cbDone() Callback for the partitioner to signal that it is done with the processing. | public void | cbParents(String child, List parents) Callback for when a partitioner determines the relations between partitions
that it has previously constructed. | public void | cbPartition(Partition p) Callback for when a partitioner determines that partition has been
constructed. | protected PDAXWriter | getHandletoPDAXWriter(String daxFile, String name, String directory) It returns the handle to the writer for writing out the pdax file
that contains the relations amongst the partitions and the jobs making
up the partitions.
Parameters: daxFile - the path to the DAX file that is being partitioned. Parameters: name - the name/label that is to be assigned to the pdax file. Parameters: directory - the directory where the partitioned daxes have to reside. | public String | getPDAX() Returns the name of the pdax file written out. | protected String | getPartitionName() Returns the name of the partition, that needs to be set while creating
the Partition object corresponding to each partition. | public void | initialize(PegasusProperties properties, String daxFile, String daxName, String directory) Initializes the Writer Callback. | protected String | partitionRelation2XML(String childID, String parentID) Returns the xml description of a relation between 2 partitions.
Parameters: childID - the ID of the child. Parameters: parentID - the ID of the parent. | protected String | partitionRelation2XML(String childID, List parentIDs) Returns the xml description of a relation between 2 partitions.
Parameters: childID - the ID of the child Parameters: parentIDs - List of parent IDs. | protected String | partitionRelation2XML(String childID, Set parentIDs) Returns the xml description of a relation between 2 partitions.
Parameters: childID - the ID of the child Parameters: parentIDs - Set of parent IDs. |
mDAXWriter | protected DAXWriter mDAXWriter(Code) | | The handle to the dax writer that writes out the dax corresponding to the
partition identified. The base name of the partition is gotten from it.
|
mPDAX | protected String mPDAX(Code) | | The path to the PDAX file written out.
|
mPDAXWriter | protected PDAXWriter mPDAXWriter(Code) | | The handle to the partition graph writer.
|
mPartitioningStarted | protected boolean mPartitioningStarted(Code) | | A boolean indicating that the partitioning has started. This is set,
by the first call to the cbPartition( Partition ) callback.
|
WriterCallback | public WriterCallback()(Code) | | The default constructor.
|
cbDone | public void cbDone()(Code) | | Callback for the partitioner to signal that it is done with the processing.
This internally closes all the handles to the DAX and PDAX writers.
|
cbParents | public void cbParents(String child, List parents)(Code) | | Callback for when a partitioner determines the relations between partitions
that it has previously constructed.
Parameters: child - the id of a partition. Parameters: parents - the list of String objects that containthe id's of the parents of the partition. throws: RuntimeException - in case of any error while writing out the DAX orthe PDAX files. |
cbPartition | public void cbPartition(Partition p)(Code) | | Callback for when a partitioner determines that partition has been
constructed. A DAX file is written out for the partition.
Parameters: p - the constructed partition. throws: RuntimeException - in case of any error while writing out the DAX orthe PDAX files. |
getHandletoPDAXWriter | protected PDAXWriter getHandletoPDAXWriter(String daxFile, String name, String directory)(Code) | | It returns the handle to the writer for writing out the pdax file
that contains the relations amongst the partitions and the jobs making
up the partitions.
Parameters: daxFile - the path to the DAX file that is being partitioned. Parameters: name - the name/label that is to be assigned to the pdax file. Parameters: directory - the directory where the partitioned daxes have to reside. handle to the writer of pdax file. |
getPDAX | public String getPDAX()(Code) | | Returns the name of the pdax file written out.
Will be null if the partitioning has not completed.
path to the pdax file. |
getPartitionName | protected String getPartitionName()(Code) | | Returns the name of the partition, that needs to be set while creating
the Partition object corresponding to each partition.
the name of the partition. |
initialize | public void initialize(PegasusProperties properties, String daxFile, String daxName, String directory)(Code) | | Initializes the Writer Callback.
Parameters: properties - the properties passed to the planner. Parameters: daxFile - the path to the DAX file that is being partitioned. Parameters: daxName - the namelabel of the DAX as set in the root element of the DAX. Parameters: directory - the directory where the partitioned daxes have to reside. |
partitionRelation2XML | protected String partitionRelation2XML(String childID, String parentID)(Code) | | Returns the xml description of a relation between 2 partitions.
Parameters: childID - the ID of the child. Parameters: parentID - the ID of the parent. the XML description of child parent relation. |
partitionRelation2XML | protected String partitionRelation2XML(String childID, List parentIDs)(Code) | | Returns the xml description of a relation between 2 partitions.
Parameters: childID - the ID of the child Parameters: parentIDs - List of parent IDs. the XML description of child parent relations. |
partitionRelation2XML | protected String partitionRelation2XML(String childID, Set parentIDs)(Code) | | Returns the xml description of a relation between 2 partitions.
Parameters: childID - the ID of the child Parameters: parentIDs - Set of parent IDs. the XML description of child parent relations. |
|
|