jolshan commented on a change in pull request #11173:
URL: https://github.com/apache/kafka/pull/11173#discussion_r819973628



##########
File path: core/src/main/scala/kafka/tools/GetOffsetShell.scala
##########
@@ -189,22 +209,26 @@ object GetOffsetShell {
     val topicFilter = IncludeList(group(1).getOrElse(".*"))
     val partitionFilter = group(2).map(_.toInt) match {
       case Some(partition) =>
-        (p: Int) => p == partition
+        UniquePartitionFilter(partition)
       case None =>
         val lowerRange = group(3).map(_.toInt).getOrElse(0)
         val upperRange = group(4).map(_.toInt).getOrElse(Int.MaxValue)
-        (p: Int) => p >= lowerRange && p < upperRange
+        PartitionRangeFilter(lowerRange, upperRange)
     }
-
-    tp => topicFilter.isTopicAllowed(tp.topic, excludeInternalTopics) && 
partitionFilter(tp.partition)
+    TopicFilterAndPartitionFilter(
+      topicFilter,
+      partitionFilter
+    )
   }
 
-  /**

Review comment:
       Did we mean to remove this comment?




-- 
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]


Reply via email to