Removed `peek()`
authorKai Moritz <kai@juplo.de>
Mon, 8 Jul 2024 17:58:01 +0000 (19:58 +0200)
committerKai Moritz <kai@juplo.de>
Wed, 17 Jul 2024 05:59:27 +0000 (07:59 +0200)
src/test/java/de/juplo/kafka/wordcount/counter/AggregationTopologyTest.java

index 58a858a..85fb265 100644 (file)
@@ -3,7 +3,10 @@ package de.juplo.kafka.wordcount.counter;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.kafka.common.serialization.Serdes;
 import org.apache.kafka.streams.*;
-import org.apache.kafka.streams.kstream.*;
+import org.apache.kafka.streams.kstream.KStream;
+import org.apache.kafka.streams.kstream.TimeWindows;
+import org.apache.kafka.streams.kstream.Window;
+import org.apache.kafka.streams.kstream.Windowed;
 import org.apache.kafka.streams.kstream.internals.TimeWindow;
 import org.apache.kafka.streams.test.TestRecord;
 import org.junit.jupiter.api.Test;
@@ -33,12 +36,10 @@ public class AggregationTopologyTest
     KStream<String, String> input = builder.stream(INPUT);
 
     input
-        .peek((k,v) -> log.info("peek-0 -- {} = {}", k, v))
         .groupByKey()
         .windowedBy(WINDOWS)
         .reduce((aggregate, value) -> aggregate + "-" + value)
         .toStream((k,v) -> k.toString())
-        .peek((k,v) -> log.info("peek-1 -- {} = {}", k, v))
         .to(OUTPUT);
 
     Topology topology = builder.build();