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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]