AndrewJSchofield commented on code in PR #16766:
URL: https://github.com/apache/kafka/pull/16766#discussion_r1701727393
##########
tools/src/main/java/org/apache/kafka/tools/consumer/group/ConsumerGroupCommand.java:
##########
@@ -812,6 +813,9 @@ private Map<TopicPartition, LogOffsetResult>
getLogOffsets(Collection<TopicParti
: new Unknown()
));
} catch (InterruptedException | ExecutionException e) {
+ if
(e.getMessage().contains(UnknownTopicOrPartitionException.class.getCanonicalName()))
{
Review Comment:
Also, I think you need similar logic in `getLogTimestampOffsets` since
that's used in a similar way for a different kind of resetting offsets and I
think it would exhibit the same problem you're trying to fix.
##########
tools/src/main/java/org/apache/kafka/tools/consumer/group/ConsumerGroupCommand.java:
##########
@@ -812,6 +813,9 @@ private Map<TopicPartition, LogOffsetResult>
getLogOffsets(Collection<TopicParti
: new Unknown()
));
} catch (InterruptedException | ExecutionException e) {
+ if
(e.getMessage().contains(UnknownTopicOrPartitionException.class.getCanonicalName()))
{
Review Comment:
This seems better as `if (e.getCause() instanceof
UnknownTopicOrPartitionException)`.
--
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]