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 2022/05/07 16:37:31 UTC

[GitHub] [kafka] guozhangwang commented on a diff in pull request #12135: KAFKA-13785: [7/N][Emit final] emit final for sliding window

guozhangwang commented on code in PR #12135:
URL: https://github.com/apache/kafka/pull/12135#discussion_r867365030


##########
streams/src/main/java/org/apache/kafka/streams/kstream/EmitStrategy.java:
##########
@@ -19,15 +19,52 @@
 import org.apache.kafka.streams.kstream.internals.UnlimitedWindow;
 import org.apache.kafka.streams.kstream.internals.emitstrategy.WindowCloseStrategy;
 import org.apache.kafka.streams.kstream.internals.emitstrategy.WindowUpdateStrategy;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * This interface controls the strategy that can be used to control how we emit results in a processor.
  */
 public interface EmitStrategy {
 
+    Logger log = LoggerFactory.getLogger(EmitStrategy.class);
+
     enum StrategyType {
-        ON_WINDOW_CLOSE,
-        ON_WINDOW_UPDATE
+        ON_WINDOW_UPDATE(0, new WindowUpdateStrategy()),

Review Comment:
   I augmented the enum with a code so that users can translate between the type to the actual strategy easily --- previously in code one has to use a switch to map.



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