cadonna commented on code in PR #12659:
URL: https://github.com/apache/kafka/pull/12659#discussion_r979837654


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StateUpdater.java:
##########
@@ -170,6 +174,27 @@ public int hashCode() {
      */
     Set<Task> getTasks();
 
+    /**
+     * Gets all tasks that are currently being restored inside the state 
updater.
+     *
+     * Tasks that have just being added into the state updater via {@link 
StateUpdater#add(Task)}
+     * or have restored completely or removed will not be returned; similarly 
tasks that have just being
+     * removed via {@link StateUpdater#remove(TaskId)} maybe returned still.
+     *
+     * @return set of all updating tasks inside the state updater
+     */
+    Set<Task> getUpdatingTasks();
+
+    /**
+     * Gets all tasks that are paused from restoring inside the state updater.
+     *
+     * Tasks that have just being paused in the state updater via {@link 
StateUpdater#pause(TaskId)}
+     * or have restored completely or removed will not be returned.
+     *
+     * @return set of all tasks paused inside the state updater
+     */
+    Set<Task> getPausedTasks();
+

Review Comment:
   I do not think we those for testing purposes since you usually test the 
implementation of an interface and not the interface itself. For exmple, on 
`DefaultStateUpdater` that is an implementation of this interface those APIs 
are exposed for testing purposes. I am also not convinced about metrics since 
those should be recorded inside the state updater implementation. I propose to 
remove those APIs and add them later if needed. 



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