Interface Partitioner<K extends>

  • Type Parameters:
    K - the key type of the partition to write.
    All Known Implementing Classes:
    DedicatedKeyPerElementPartitioner, HashPartitioner, IntactPartitioner

    public interface Partitioner<K extends>
    This interface represents the way of partitioning output data from a source task. It takes an element and designates key of partition to write the element, according to the number of destination tasks, the key of each element, etc.
    • Method Detail

      • partition

        K partition​(java.lang.Object element)
        Divides the output data from a task into multiple blocks.
        element - the output element from a source task.
        the key of the partition in the block to write the element.