Class FixedKinesisPartitionKeyGenerator<T>

  • All Implemented Interfaces:
    Serializable, java.util.function.Function<T,​String>, PartitionKeyGenerator<T>

    @PublicEvolving
    public final class FixedKinesisPartitionKeyGenerator<T>
    extends Object
    implements PartitionKeyGenerator<T>
    A partitioner ensuring that each internal Flink partition ends up in the same Kinesis partition.

    This is achieved by using the index of the producer task as a PartitionKey.

    See Also:
    Serialized Form
    • Constructor Detail

      • FixedKinesisPartitionKeyGenerator

        public FixedKinesisPartitionKeyGenerator()
    • Method Detail

      • initialize

        public void initialize​(int indexOfThisSubtask,
                               int numberOfParallelSubtasks)
      • apply

        public String apply​(T record)
        Specified by:
        apply in interface java.util.function.Function<T,​String>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object