dajac commented on a change in pull request #11936: URL: https://github.com/apache/kafka/pull/11936#discussion_r834419560
########## File path: core/src/main/scala/kafka/tools/GetOffsetShell.scala ########## @@ -135,7 +135,11 @@ object GetOffsetShell { val partitionOffsets = partitionInfos.flatMap { tp => try { val partitionInfo = listOffsetsResult.partitionResult(tp).get - Some((tp, partitionInfo.offset)) + if (partitionInfo.offset != ListOffsetsResponse.UNKNOWN_OFFSET) { + Some((tp, partitionInfo.offset)) + } else { + None Review comment: Using a warning does not seem right here as it is expected to have no offsets in certain conditions. In the previous implementation, they were just ignored. Why not doing the same to be consistent? If we believe that this is not good enough, perhaps printing the -1 (or NONE) to indicate there is no offset for a partition might be better. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org