Modifier and Type | Field and Description |
---|---|
protected DAXWriter |
mDAXWriter
The handle to the dax writer that writes out the dax corresponding to the
partition identified.
|
protected LogManager |
mLogger
The handle to the logger object.
|
protected boolean |
mPartitioningStarted
A boolean indicating that the partitioning has started.
|
protected String |
mPDAX
The path to the PDAX file written out.
|
protected PDAXWriter |
mPDAXWriter
The handle to the partition graph writer.
|
protected PegasusProperties |
mProps
Handle to the properties available.
|
Constructor and Description |
---|
WriterCallback()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cbDone()
Callback for the partitioner to signal that it is done with the processing.
|
void |
cbParents(String child,
List parents)
Callback for when a partitioner determines the relations between partitions
that it has previously constructed.
|
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.
|
protected String |
getPartitionName()
Returns the name of the partition, that needs to be set while creating
the Partition object corresponding to each partition.
|
String |
getPDAX()
Returns the name of the pdax file written out.
|
void |
initialize(PegasusProperties properties,
String daxFile,
String daxName,
String directory)
Initializes the Writer Callback.
|
protected String |
partitionRelation2XML(String childID,
List parentIDs)
Returns the xml description of a relation between 2 partitions.
|
protected String |
partitionRelation2XML(String childID,
Set parentIDs)
Returns the xml description of a relation between 2 partitions.
|
protected String |
partitionRelation2XML(String childID,
String parentID)
Returns the xml description of a relation between 2 partitions.
|
protected PDAXWriter mPDAXWriter
protected DAXWriter mDAXWriter
protected String mPDAX
protected PegasusProperties mProps
protected LogManager mLogger
protected boolean mPartitioningStarted
public void initialize(PegasusProperties properties, String daxFile, String daxName, String directory)
properties
- the properties passed to the planner.daxFile
- the path to the DAX file that is being partitioned.daxName
- the namelabel of the DAX as set in the root element of the DAX.directory
- the directory where the partitioned daxes have to reside.public void cbPartition(Partition p)
cbPartition
in interface Callback
p
- the constructed partition.RuntimeException
- in case of any error while writing out the DAX or
the PDAX files.public void cbParents(String child, List parents)
cbParents
in interface Callback
child
- the id of a partition.parents
- the list of String
objects that contain
the id's of the parents of the partition.RuntimeException
- in case of any error while writing out the DAX or
the PDAX files.public void cbDone()
public String getPDAX()
protected String getPartitionName()
protected PDAXWriter getHandletoPDAXWriter(String daxFile, String name, String directory)
daxFile
- the path to the DAX file that is being partitioned.name
- the name/label that is to be assigned to the pdax file.directory
- the directory where the partitioned daxes have to reside.protected String partitionRelation2XML(String childID, String parentID)
childID
- the ID of the child.parentID
- the ID of the parent.protected String partitionRelation2XML(String childID, List parentIDs)
childID
- the ID of the childparentIDs
- List
of parent IDs.