Class IdPartitioner

    • Constructor Detail

      • IdPartitioner

        public IdPartitioner()
    • Method Detail

      • partition

        public int partition​(Integer key,
                             int numPartitions)
        Description copied from interface: Partitioner
        Computes the partition for the given key.
        Specified by:
        partition in interface Partitioner<Integer>
        Parameters:
        key - The key.
        numPartitions - The number of partitions to partition into.
        Returns:
        The partition index.