snleee commented on code in PR #11769:
URL: https://github.com/apache/pinot/pull/11769#discussion_r1352882744
##########
pinot-plugins/pinot-stream-ingestion/pinot-kafka-2.0/src/main/java/org/apache/pinot/plugin/stream/kafka20/KafkaStreamMetadataProvider.java:
##########
@@ -57,7 +60,11 @@ public KafkaStreamMetadataProvider(String clientId,
StreamConfig streamConfig, i
@Override
public int fetchPartitionCount(long timeoutMillis) {
try {
- return _consumer.partitionsFor(_topic,
Duration.ofMillis(timeoutMillis)).size();
+ List<PartitionInfo> partitionInfos = _consumer.partitionsFor(_topic,
Duration.ofMillis(timeoutMillis));
+ if (CollectionUtils.isNotEmpty(partitionInfos)) {
+ return partitionInfos.size();
+ }
+ throw new RuntimeException(String.format("Failed to fetch partition
information for topic: %s", _topic));
Review Comment:
Can you double check if we have `PermanantConsumerException`? Or, we just
have `TransientConsumerException`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]