You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/07/07 23:52:41 UTC

[GitHub] [kafka] skaundinya15 commented on a change in pull request #10962: KAFKA-12234: Implement request/response for offsetFetch batching (KIP-709)

skaundinya15 commented on a change in pull request #10962:
URL: https://github.com/apache/kafka/pull/10962#discussion_r665777053



##########
File path: clients/src/main/java/org/apache/kafka/common/requests/OffsetFetchRequest.java
##########
@@ -174,6 +315,28 @@ public boolean isAllPartitions() {
         return data.topics() == ALL_TOPIC_PARTITIONS;
     }
 
+    public boolean isAllPartitionsForGroup(String groupId) {
+        OffsetFetchRequestGroup group = data
+            .groupIds()
+            .stream()
+            .filter(g -> g.groupId().equals(groupId))
+            .collect(toSingleton());
+        return group.topics() == ALL_TOPIC_PARTITIONS_BATCH;
+    }
+
+    // Custom collector to filter a single element
+    private <T> Collector<T, ?, T> toSingleton() {

Review comment:
       Opened https://issues.apache.org/jira/browse/KAFKA-13045 to track this.




-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org