Class BasePartitioner

  • All Implemented Interfaces:
    IPartitioner
    Direct Known Subclasses:
    ModPartitioner

    public abstract class BasePartitioner
    extends Object
    implements IPartitioner
    Implements common functionality needed by partitioner plugins.
    • Constructor Detail

      • BasePartitioner

        public BasePartitioner()
        Instantiates a new base partitioner.
    • Method Detail

      • 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 expressions
        rowMeta - the row meta
        Throws:
        HopException - the hop exception
      • getInstance

        public abstract IPartitioner getInstance()
        Description copied from interface: IPartitioner
        Gets the single instance of IPartitioner.
        Specified by:
        getInstance in interface IPartitioner
        Returns:
        single instance of IPartitioner
      • setDescription

        public void setDescription​(String description)
        Description copied from interface: IPartitioner
        Sets the description.
        Specified by:
        setDescription in interface IPartitioner
        Parameters:
        description - the new description
      • setId

        public void setId​(String id)
        Description copied from interface: IPartitioner
        Sets the id.
        Specified by:
        setId in interface IPartitioner
        Parameters:
        id - the new id