| java.lang.Object org.griphyn.cPlanner.partitioner.DAXWriter
All known Subclasses: org.griphyn.cPlanner.partitioner.MultipleLook, org.griphyn.cPlanner.partitioner.SingleLook,
DAXWriter | abstract public class DAXWriter (Code) | | The abstract class that identifies the interface for writing out a dax
corresponding to a partition. The interface stipulates that the jobs making
up the partition and relations between those jobs in the partition are
identified when invoking it. However all the job details are to be gotten
by the implementing classes by parsing the original dax.
author: Karan Vahi version: $Revision: 50 $ |
Method Summary | |
public void | close() Close the write handle to the file that is written. | public static String | getPDAXFilename(String daxName, int index) It constructs the name of the partitioned dax file that has to be written
corresponding to a partition of the dax. | public static String | getPDAXFilename(String daxName, int index, boolean addPrefix) It constructs the name of the partitioned dax file that has to be written
corresponding to a partition of the dax. | public String | getPartitionName() It returns the name of the partitioned dax, that the object is
currently writing or initialized to write. | public void | initializeWriteHandle(int index) This initializes the write handle a file in directory specified
when creating the instance of this class. | public void | initializeWriteHandle(String fileName) This initializes the write handle to the file in directory specified
when creating the instance of this class. | public static DAXWriter | loadInstance(PegasusProperties properties, String daxFile, String directory) The ends up loading the PDAXWriter. | public static DAXWriter | loadInstance(String className, PegasusProperties properties, String daxFile, String directory) Loads the implementing PDAXWriter. | public void | setPartitionName(String daxName) It sets the name of the partition in the dax that is generated. | public boolean | writePartitionDax(Partition partition) It writes out a dax consisting of the jobs as specified in the partition.
Parameters: partition - the partition object containing the relations and id'sof the jobs making up the partition. | abstract public boolean | writePartitionDax(Partition partition, int index) It writes out a dax consisting of the jobs as specified in the partition.
Parameters: partition - the partition object containing the relations and id'sof the jobs making up the partition. Parameters: index - the index of the partition. | public void | writeln(String st) Writes out to the file. |
PACKAGE_NAME | final public static String PACKAGE_NAME(Code) | | The name of the package in which the writers are implemented.
|
PARTITION_PREFIX | final public static String PARTITION_PREFIX(Code) | | The prefix added to the name of the dax to identify it is a partitioned
dax.
|
mDaxFile | protected String mDaxFile(Code) | | The dax file that is being partitioned. The dax file is the repository
for all the jobs in the partitioned daxes.
|
mPDAXDirectory | protected String mPDAXDirectory(Code) | | The directory in which the daxes corresponding to the partition are
generated.
|
mPartitionName | protected String mPartitionName(Code) | | The name of the partition dax that are generated.
|
mWriteHandle | protected PrintWriter mWriteHandle(Code) | | The write handle to the xml file being written.
|
DAXWriter | protected DAXWriter()(Code) | | The default constructor
|
DAXWriter | protected DAXWriter(String daxFile, String directory)(Code) | | The overloaded constructor.
Parameters: daxFile - the path to the dax file that is being partitioned. Parameters: directory - the directory in which the partitioned daxes are to begenerated. |
close | public void close()(Code) | | Close the write handle to the file that is written.
|
getPDAXFilename | public static String getPDAXFilename(String daxName, int index)(Code) | | It constructs the name of the partitioned dax file that has to be written
corresponding to a partition of the dax. The dax name returned has no
prefix added to it.
Parameters: daxName - the name attribute in the adag element of the dax. Parameters: index - the partition number of the partition. |
getPDAXFilename | public static String getPDAXFilename(String daxName, int index, boolean addPrefix)(Code) | | It constructs the name of the partitioned dax file that has to be written
corresponding to a partition of the dax.
Parameters: daxName - the name attribute in the adag element of the dax. Parameters: index - the partition number of the partition. Parameters: addPrefix - whether you want to addPrefix or not. |
getPartitionName | public String getPartitionName()(Code) | | It returns the name of the partitioned dax, that the object is
currently writing or initialized to write. By the name, one means the
value that is set to the name attribute in the adag element.
|
initializeWriteHandle | public void initializeWriteHandle(int index)(Code) | | This initializes the write handle a file in directory specified
when creating the instance of this class. The name of the file is
constructed by default, by looking at the partition name that is
assigned to the name attribute for the adag element.
Parameters: index - the partition number of the partition. |
initializeWriteHandle | public void initializeWriteHandle(String fileName)(Code) | | This initializes the write handle to the file in directory specified
when creating the instance of this class.
Parameters: fileName - the name of the file that is to be written in thedirectory. |
loadInstance | public static DAXWriter loadInstance(PegasusProperties properties, String daxFile, String directory)(Code) | | The ends up loading the PDAXWriter. It selects the writer as specified by
the vds.partition.parse.mode property.
Parameters: properties - the handle to the properties visible to Pegasus. Parameters: daxFile - the path to the dax file that is being partitioned. Parameters: directory - the directory in which the partitioned daxes are to begenerated. |
loadInstance | public static DAXWriter loadInstance(String className, PegasusProperties properties, String daxFile, String directory) throws FactoryException(Code) | | Loads the implementing PDAXWriter. The name of the class that is to be
loaded is passed and can be complete(with package name) or just the name
of the class, in which case the class is loaded from the default package.
Parameters: properties - the handle to the properties visible to Pegasus. Parameters: className - the name of the class with or without the package name. Parameters: daxFile - the path to the dax file that is being partitioned. Parameters: directory - the directory in which the partitioned daxes are to begenerated. throws: FactoryException - that nests any error thatmight occur during the instantiation of the implementation. |
setPartitionName | public void setPartitionName(String daxName)(Code) | | It sets the name of the partition in the dax that is generated. It suffixes
PARTITION_PREFIX to the name of the dax.
Parameters: daxName - the name attribute in the adag element of the dax. |
writePartitionDax | public boolean writePartitionDax(Partition partition)(Code) | | It writes out a dax consisting of the jobs as specified in the partition.
Parameters: partition - the partition object containing the relations and id'sof the jobs making up the partition. boolean true if dax successfully generated and written.false in case of error. |
writePartitionDax | abstract public boolean writePartitionDax(Partition partition, int index)(Code) | | It writes out a dax consisting of the jobs as specified in the partition.
Parameters: partition - the partition object containing the relations and id'sof the jobs making up the partition. Parameters: index - the index of the partition. boolean true if dax successfully generated and written.false in case of error. |
writeln | public void writeln(String st)(Code) | | Writes out to the file.
|
|
|