Class NumberOfRecordsPartitioner

    • Constructor Detail

      • NumberOfRecordsPartitioner

        public NumberOfRecordsPartitioner()
    • Method Detail

      • totalRecordsWritten

        public int totalRecordsWritten()
        Description copied from interface: Partitioner
        Returns the total records written
        Specified by:
        totalRecordsWritten in interface Partitioner
        Returns:
      • numRecordsWritten

        public int numRecordsWritten()
        Description copied from interface: Partitioner
        Number of records written so far
        Specified by:
        numRecordsWritten in interface Partitioner
        Returns:
      • numPartitions

        public int numPartitions()
        Description copied from interface: Partitioner
        Returns the number of partitions
        Specified by:
        numPartitions in interface Partitioner
        Returns:
      • init

        public void init​(InputSplit inputSplit)
        Description copied from interface: Partitioner
        Initializes this partitioner with the given configuration and input split
        Specified by:
        init in interface Partitioner
        Parameters:
        inputSplit - the input split to use with this partitioner
      • init

        public void init​(Configuration configuration,
                         InputSplit split)
        Description copied from interface: Partitioner
        Initializes this partitioner with the given configuration and input split
        Specified by:
        init in interface Partitioner
        Parameters:
        configuration - the configuration to configure this partitioner with
        split - the input split to use with this partitioner
      • updatePartitionInfo

        public void updatePartitionInfo​(PartitionMetaData metadata)
        Description copied from interface: Partitioner
        Updates the metadata for this partitioner (to indicate whether the next partition is needed or not)
        Specified by:
        updatePartitionInfo in interface Partitioner