org.pentaho.di.trans
Interface Partitioner

All Known Implementing Classes:
BasePartitioner, ModPartitioner

public interface Partitioner

Defines methods needed for partitioner plugins. The main responsibilities are:


Method Summary
 Partitioner clone()
          Clone.
 String getDescription()
          Gets the description.
 String getDialogClassName()
          Gets the dialog class name.
 String getId()
          Gets the id.
 Partitioner getInstance()
          Gets the single instance of Partitioner.
 int getPartition(RowMetaInterface rowMeta, Object[] r)
          Gets the partition.
 String getXML()
          Gets the xml.
 void loadRep(Repository rep, ObjectId id_step)
          Load rep.
 void loadXML(Node partitioningMethodNode)
          Load xml.
 void saveRep(Repository rep, ObjectId id_transformation, ObjectId id_step)
          Saves partitioning properties in the repository for the given step.
 void setDescription(String description)
          Sets the description.
 void setId(String id)
          Sets the id.
 void setMeta(StepPartitioningMeta meta)
          Sets the meta.
 

Method Detail

getInstance

Partitioner getInstance()
Gets the single instance of Partitioner.

Returns:
single instance of Partitioner

getPartition

int getPartition(RowMetaInterface rowMeta,
                 Object[] r)
                 throws KettleException
Gets the partition.

Parameters:
rowMeta - the row meta
r - the r
Returns:
the partition
Throws:
KettleException - the kettle exception

setMeta

void setMeta(StepPartitioningMeta meta)
Sets the meta.

Parameters:
meta - the new meta

getId

String getId()
Gets the id.

Returns:
the id

getDescription

String getDescription()
Gets the description.

Returns:
the description

setId

void setId(String id)
Sets the id.

Parameters:
id - the new id

setDescription

void setDescription(String description)
Sets the description.

Parameters:
description - the new description

getDialogClassName

String getDialogClassName()
Gets the dialog class name.

Returns:
the dialog class name

clone

Partitioner clone()
Clone.

Returns:
the partitioner

getXML

String getXML()
Gets the xml.

Returns:
the xml

loadXML

void loadXML(Node partitioningMethodNode)
             throws KettleXMLException
Load xml.

Parameters:
partitioningMethodNode - the partitioning method node
Throws:
KettleXMLException - the kettle xml exception

saveRep

void saveRep(Repository rep,
             ObjectId id_transformation,
             ObjectId id_step)
             throws KettleException
Saves partitioning properties in the repository for the given step.

Parameters:
rep - the repository to save in
id_transformation - the ID of the transformation
id_step - the ID of the step
Throws:
KettleDatabaseException - In case anything goes wrong
KettleException

loadRep

void loadRep(Repository rep,
             ObjectId id_step)
             throws KettleException
Load rep.

Parameters:
rep - the rep
id_step - the id_step
Throws:
KettleException - the kettle exception