public interface ManualPartitioner extends Serializable
A function used to assign partitions to this spout. WARNING if this is not done correctly you can really mess things up, like not reading data in some partitions. The complete TopologyContext is passed in, but it is suggested that you use the index of the spout and the total number of spouts to avoid missing partitions or double assigning partitions.
List<org.apache.kafka.common.TopicPartition> partition(List<org.apache.kafka.common.TopicPartition> allPartitions, TopologyContext context)
Get the partitions for this assignment
allPartitions- all of the partitions that the set of spouts want to subscribe to, in a strict ordering
context- the context of the topology
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.