Onur Karaman created KAFKA-3661:
-----------------------------------
Summary: org.apache.kafka.clients.consumer.RoundRobinAssignor
throws NPE when topic metadata not found
Key: KAFKA-3661
URL: https://issues.apache.org/jira/browse/KAFKA-3661
Project: Kafka
Issue Type: Bug
Reporter: Onur Karaman
Assignee: Onur Karaman
AbstractPartitionAssignor.assign has an ambiguous line in its documentation:
{code}
@param partitionsPerTopic The number of partitions for each subscribed topic
(may be empty for some topics)
{code}
Does empty mean the topic has an entry with value zero, or that the entry is
excluded from the map altogether? The current implementation in
AbstractPartitionAssignor excludes the entry from partitionsPerTopic if the
topic isn't in the metadata.
RoundRobinAssignorTest.testOneConsumerNonexistentTopic interprets emptiness as
providing the topic with a zero value.
RangeAssignor interprets emptiness as excluding the entry from the map.
RangeAssignorTest.testOneConsumerNonexistentTopic interprets emptiness as
providing the topic with a zero value.
I don't really have a preference in which direction we take. We just need to
more clearly document what happens when the topic isn't in the metadata.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)