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



##########
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:
       Oh no, this was a misoperate, this method was removed first and brought 
back since we need a test case for it. I have changed it back. 




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


Reply via email to