vvcephei commented on a change in pull request #11336:
URL: https://github.com/apache/kafka/pull/11336#discussion_r714237174



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalProcessorContextImpl.java
##########
@@ -110,6 +112,11 @@ public long currentStreamTimeMs() {
         throw new UnsupportedOperationException("There is no concept of 
stream-time for a global processor.");
     }
 
+    @Override
+    public Map<TopicPartition, Long> currentPositions() {
+        throw new UnsupportedOperationException("currentPositions is not 
supported for global processors.");

Review comment:
       Two reasons:
   1. The code isn't already in place to track it (because we don't commit 
global tasks), and I'm lazy :)
   2. I think the reasoning is similar to the currentStreamTimeMs: the Global 
thread doesn't have a coherent "task" that has a "stream time" or a "position". 
It's more similar to the restore consumer. It's just a bunch of partitions that 
all got grouped together for batching efficiency.  It seems like there could be 
a use case for asking the current position of the global thread (or the restore 
consumers) on a particular partition, but it's not the same semantics as 
finding out the "current position of this task on its inputs".
   
   So, I don't think it would be invalid to add it, but it's both not that easy 
and different from what I'm trying to support here. I'll mention this in the 
KIP as a "deferred for now" option.




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