Package org.apache.hop.pipeline
Class ModPartitioner
- java.lang.Object
-
- org.apache.hop.pipeline.BasePartitioner
-
- org.apache.hop.pipeline.ModPartitioner
-
- All Implemented Interfaces:
IPartitioner
@PartitionerPlugin(id="ModPartitioner", name="Remainder of division", description="Mod") public class ModPartitioner extends BasePartitioner
-
-
Field Summary
Fields Modifier and Type Field Description protected intpartitionColumnIndex-
Fields inherited from class org.apache.hop.pipeline.BasePartitioner
description, id, meta, nrPartitions
-
-
Constructor Summary
Constructors Constructor Description ModPartitioner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModPartitionerclone()Clone.StringgetDescription()Gets the description.StringgetDialogClassName()Gets the dialog class name.StringgetFieldName()IPartitionergetInstance()Gets the single instance of IPartitioner.intgetPartition(IVariables variables, IRowMeta rowMeta, Object[] row)Gets the partition.StringgetXml()Gets the xml.voidloadXml(Node partitioningMethodNode)Load xml.voidsetFieldName(String fieldName)-
Methods inherited from class org.apache.hop.pipeline.BasePartitioner
getId, getMeta, getNrPartitions, init, setDescription, setId, setMeta, setNrPartitions
-
-
-
-
Method Detail
-
getInstance
public IPartitioner getInstance()
Description copied from interface:IPartitionerGets the single instance of IPartitioner.- Specified by:
getInstancein interfaceIPartitioner- Specified by:
getInstancein classBasePartitioner- Returns:
- single instance of IPartitioner
-
clone
public ModPartitioner clone()
Description copied from interface:IPartitionerClone.- Specified by:
clonein interfaceIPartitioner- Overrides:
clonein classBasePartitioner- Returns:
- the partitioner
-
getDialogClassName
public String getDialogClassName()
Description copied from interface:IPartitionerGets the dialog class name.- Returns:
- the dialog class name
-
getPartition
public int getPartition(IVariables variables, IRowMeta rowMeta, Object[] row) throws HopException
Description copied from interface:IPartitionerGets the partition.- Parameters:
variables- the variables to resolve variable expressions withrowMeta- the row metarow- the r- Returns:
- the partition
- Throws:
HopException- the hop exception
-
getDescription
public String getDescription()
Description copied from interface:IPartitionerGets the description.- Specified by:
getDescriptionin interfaceIPartitioner- Overrides:
getDescriptionin classBasePartitioner- Returns:
- the description
-
getXml
public String getXml()
Description copied from interface:IPartitionerGets the xml.- Returns:
- the xml
-
loadXml
public void loadXml(Node partitioningMethodNode) throws HopXmlException
Description copied from interface:IPartitionerLoad xml.- Parameters:
partitioningMethodNode- the partitioning method node- Throws:
HopXmlException- the hop xml exception
-
getFieldName
public String getFieldName()
-
setFieldName
public void setFieldName(String fieldName)
-
-