Class FirstPartitionPartitioner

  • All Implemented Interfaces:
    Partitioner, java.io.Serializable

    public class FirstPartitionPartitioner
    extends java.lang.Object
    implements Partitioner
    Partitioner that always send the ingest into first partition.
    See Also:
    Serialized Form
    • Constructor Detail

      • FirstPartitionPartitioner

        public FirstPartitionPartitioner()
    • Method Detail

      • getPartitionId

        public int getPartitionId​(StreamElement element)
        Description copied from interface: Partitioner
        Retrieve partition ID for the specified ingest. All ingests that have the same partition ID are guaranteed to be written to the same Kafka partition.
        Specified by:
        getPartitionId in interface Partitioner
        Parameters:
        element - element to calculate partition for
        Returns:
        ID of partition (can be negative)