popular: 1.1.1 - Refined output JSON popular-1.1.1
authorKai Moritz <kai@juplo.de>
Thu, 20 Jun 2024 19:50:15 +0000 (21:50 +0200)
committerKai Moritz <kai@juplo.de>
Thu, 20 Jun 2024 19:50:15 +0000 (21:50 +0200)
pom.xml
src/main/java/de/juplo/kafka/wordcount/popular/WindowedWord.java
src/main/java/de/juplo/kafka/wordcount/popular/WordCounter.java
src/test/java/de/juplo/kafka/wordcount/popular/TestData.java
src/test/java/de/juplo/kafka/wordcount/stats/OutputWindowedWord.java
src/test/java/de/juplo/kafka/wordcount/stats/OutputWordCounter.java

diff --git a/pom.xml b/pom.xml
index a9ba9e1..0c99200 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
        </parent>
        <groupId>de.juplo.kafka.wordcount</groupId>
        <artifactId>popular</artifactId>
-       <version>1.1.0</version>
+       <version>1.1.1</version>
        <name>Wordcount-Popular-Words</name>
        <description>Query stream-processor that gives access to the most popular words</description>
        <properties>
index c94ec0e..bc4243e 100644 (file)
@@ -10,6 +10,6 @@ import lombok.NoArgsConstructor;
 @AllArgsConstructor(staticName = "of")
 public class WordCounter
 {
-  String word;
+  String key;
   long counter;
 }
index fa6a258..4ac9fd4 100644 (file)
@@ -192,7 +192,7 @@ class TestData
 
                windowedWord.setStart(ZonedDateTime.ofInstant(outputWindowedWord.getStart(), CLOCK.getZone()));
                windowedWord.setEnd(ZonedDateTime.ofInstant(outputWindowedWord.getEnd(), CLOCK.getZone()));
-               windowedWord.setWord(outputWindowedWord.getWord());
+               windowedWord.setKey(outputWindowedWord.getKey());
 
                return windowedWord;
        }
@@ -211,7 +211,7 @@ class TestData
                        WordCounter counter)
        {
                OutputWordCounter outputWordCounter = OutputWordCounter.of(
-                               word.getWord(),
+                               word.getKey(),
                                counter.getCounter());
                assertWordCountEqualsWordCountFromLastMessage(word, outputWordCounter);
        }
index f132707..ce8a764 100644 (file)
@@ -10,6 +10,6 @@ import lombok.NoArgsConstructor;
 @AllArgsConstructor(staticName = "of")
 public class OutputWordCounter
 {
-  String word;
+  String key;
   long counter;
 }