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 2021/10/05 00:14:01 UTC

[GitHub] [kafka] mjsax opened a new pull request #11380: KAFKA-13345: Use "delete" cleanup policy for windowed stores if duplicates are enabled

mjsax opened a new pull request #11380:
URL: https://github.com/apache/kafka/pull/11380


   Call for review @guozhangwang @cadonna 


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



[GitHub] [kafka] mjsax commented on a change in pull request #11380: KAFKA-13345: Use "delete" cleanup policy for windowed stores if duplicates are enabled

Posted by GitBox <gi...@apache.org>.
mjsax commented on a change in pull request #11380:
URL: https://github.com/apache/kafka/pull/11380#discussion_r728377936



##########
File path: streams/src/test/java/org/apache/kafka/streams/integration/JoinStoreIntegrationTest.java
##########
@@ -131,4 +143,50 @@ public void providingAJoinStoreNameShouldNotMakeTheJoinResultQueriable() throws
             );
         }
     }
+
+    @Test
+    public void streamJoinChangelogTopicShouldBeConfiguredWithDeleteOnlyCleanupPolicy() throws Exception {
+        STREAMS_CONFIG.put(StreamsConfig.APPLICATION_ID_CONFIG, APP_ID + "-changelog-cleanup-policy");
+        final StreamsBuilder builder = new StreamsBuilder();
+
+        final KStream<String, Integer> left = builder.stream(INPUT_TOPIC_LEFT, Consumed.with(Serdes.String(), Serdes.Integer()));
+        final KStream<String, Integer> right = builder.stream(INPUT_TOPIC_RIGHT, Consumed.with(Serdes.String(), Serdes.Integer()));
+        final CountDownLatch latch = new CountDownLatch(1);
+
+        left.join(
+            right,
+            Integer::sum,
+            JoinWindows.of(ofMillis(100)),
+            StreamJoined.with(Serdes.String(), Serdes.Integer(), Serdes.Integer()).withStoreName("join-store"));
+
+        System.out.println(builder.build().describe());

Review comment:
       Good catch!




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



[GitHub] [kafka] showuon commented on a change in pull request #11380: KAFKA-13345: Use "delete" cleanup policy for windowed stores if duplicates are enabled

Posted by GitBox <gi...@apache.org>.
showuon commented on a change in pull request #11380:
URL: https://github.com/apache/kafka/pull/11380#discussion_r722946931



##########
File path: streams/src/test/java/org/apache/kafka/streams/integration/JoinStoreIntegrationTest.java
##########
@@ -131,4 +143,50 @@ public void providingAJoinStoreNameShouldNotMakeTheJoinResultQueriable() throws
             );
         }
     }
+
+    @Test
+    public void streamJoinChangelogTopicShouldBeConfiguredWithDeleteOnlyCleanupPolicy() throws Exception {
+        STREAMS_CONFIG.put(StreamsConfig.APPLICATION_ID_CONFIG, APP_ID + "-changelog-cleanup-policy");
+        final StreamsBuilder builder = new StreamsBuilder();
+
+        final KStream<String, Integer> left = builder.stream(INPUT_TOPIC_LEFT, Consumed.with(Serdes.String(), Serdes.Integer()));
+        final KStream<String, Integer> right = builder.stream(INPUT_TOPIC_RIGHT, Consumed.with(Serdes.String(), Serdes.Integer()));
+        final CountDownLatch latch = new CountDownLatch(1);
+
+        left.join(
+            right,
+            Integer::sum,
+            JoinWindows.of(ofMillis(100)),
+            StreamJoined.with(Serdes.String(), Serdes.Integer(), Serdes.Integer()).withStoreName("join-store"));
+
+        System.out.println(builder.build().describe());

Review comment:
       debug line should be removed.

##########
File path: streams/src/main/java/org/apache/kafka/streams/state/internals/AbstractStoreBuilder.java
##########
@@ -62,7 +62,7 @@ public AbstractStoreBuilder(final String name,
     public StoreBuilder<T> withLoggingEnabled(final Map<String, String> config) {
         Objects.requireNonNull(config, "config can't be null");
         enableLogging = true;
-        logConfig = config;
+        logConfig.putAll(config);

Review comment:
       Nice catch




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