mjsax commented on a change in pull request #11336: URL: https://github.com/apache/kafka/pull/11336#discussion_r713538585
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/api/ProcessorContext.java ########## @@ -247,4 +251,45 @@ Cancellable schedule(final Duration interval, * @return the key/values matching the given prefix from the StreamsConfig properties. */ Map<String, Object> appConfigsWithPrefix(final String prefix); + + /** + * Return the current system timestamp (also called wall-clock time) in milliseconds. + * + * <p> Note: this method returns the internally cached system timestamp from the Kafka Stream runtime. + * Thus, it may return a different value compared to {@code System.currentTimeMillis()}. + * + * @return the current system timestamp in milliseconds + */ + long currentSystemTimeMs(); Review comment: Did we miss to add those to the new context via https://cwiki.apache.org/confluence/display/KAFKA/KIP-622%3A+Add+currentSystemTimeMs+and+currentStreamTimeMs+to+ProcessorContext ??? ########## 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: Why not? (We also support `currentSystemTimeMs()` -- we only don't support `currentStreamTimeMs()` because the global thread processed independently of the main threads, and there is no concept of stream-time for the global task. -- 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