Package org.apache.hop.pipeline
Class BasePartitioner
- java.lang.Object
-
- org.apache.hop.pipeline.BasePartitioner
-
- All Implemented Interfaces:
IPartitioner
- Direct Known Subclasses:
ModPartitioner
public abstract class BasePartitioner extends Object implements IPartitioner
Implements common functionality needed by partitioner plugins.
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringdescriptionprotected Stringidprotected TransformPartitioningMetametaprotected intnrPartitions
-
Constructor Summary
Constructors Constructor Description BasePartitioner()Instantiates a new base partitioner.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description IPartitionerclone()Clone.StringgetDescription()Gets the description.StringgetId()Gets the id.abstract IPartitionergetInstance()Gets the single instance of IPartitioner.TransformPartitioningMetagetMeta()Gets the meta.intgetNrPartitions()Gets the nr partitions.voidinit(IVariables variables, IRowMeta rowMeta)Initialises the partitioner.voidsetDescription(String description)Sets the description.voidsetId(String id)Sets the id.voidsetMeta(TransformPartitioningMeta meta)Sets the meta.voidsetNrPartitions(int nrPartitions)Sets the nr partitions.-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.hop.pipeline.IPartitioner
getDialogClassName, getPartition, getXml, loadXml
-
-
-
-
Field Detail
-
meta
protected TransformPartitioningMeta meta
-
nrPartitions
protected int nrPartitions
-
id
protected String id
-
description
protected String description
-
-
Method Detail
-
clone
public IPartitioner clone()
Description copied from interface:IPartitionerClone.- Specified by:
clonein interfaceIPartitioner- Overrides:
clonein classObject- Returns:
- the partitioner
-
getNrPartitions
public int getNrPartitions()
Gets the nr partitions.- Returns:
- the nr partitions
-
setNrPartitions
public void setNrPartitions(int nrPartitions)
Sets the nr partitions.- Parameters:
nrPartitions- the new nr partitions
-
init
public void init(IVariables variables, IRowMeta rowMeta) throws HopException
Initialises the partitioner.- Parameters:
variables- the variables to use to resolve variables expressionsrowMeta- the row meta- Throws:
HopException- the hop exception
-
getMeta
public TransformPartitioningMeta getMeta()
Gets the meta.- Returns:
- the meta
-
setMeta
public void setMeta(TransformPartitioningMeta meta)
Description copied from interface:IPartitionerSets the meta.- Specified by:
setMetain interfaceIPartitioner- Parameters:
meta- the new meta
-
getInstance
public abstract IPartitioner getInstance()
Description copied from interface:IPartitionerGets the single instance of IPartitioner.- Specified by:
getInstancein interfaceIPartitioner- Returns:
- single instance of IPartitioner
-
getDescription
public String getDescription()
Description copied from interface:IPartitionerGets the description.- Specified by:
getDescriptionin interfaceIPartitioner- Returns:
- the description
-
setDescription
public void setDescription(String description)
Description copied from interface:IPartitionerSets the description.- Specified by:
setDescriptionin interfaceIPartitioner- Parameters:
description- the new description
-
getId
public String getId()
Description copied from interface:IPartitionerGets the id.- Specified by:
getIdin interfaceIPartitioner- Returns:
- the id
-
setId
public void setId(String id)
Description copied from interface:IPartitionerSets the id.- Specified by:
setIdin interfaceIPartitioner- Parameters:
id- the new id
-
-