popular: 1.0.0 - Renamed packages and classes -- ALIGN
authorKai Moritz <kai@juplo.de>
Sat, 15 Jun 2024 19:24:58 +0000 (21:24 +0200)
committerKai Moritz <kai@juplo.de>
Sat, 15 Jun 2024 19:24:58 +0000 (21:24 +0200)
12 files changed:
src/main/java/de/juplo/kafka/wordcount/popular/Entry.java
src/main/java/de/juplo/kafka/wordcount/popular/Key.java
src/main/java/de/juplo/kafka/wordcount/popular/PopularApplication.java
src/main/java/de/juplo/kafka/wordcount/popular/PopularApplicationConfiguration.java
src/main/java/de/juplo/kafka/wordcount/popular/PopularApplicationProperties.java
src/main/java/de/juplo/kafka/wordcount/popular/PopularStreamProcessor.java
src/main/java/de/juplo/kafka/wordcount/popular/Ranking.java
src/main/java/de/juplo/kafka/wordcount/popular/User.java
src/test/java/de/juplo/kafka/wordcount/popular/PopularApplicationIT.java
src/test/java/de/juplo/kafka/wordcount/popular/PopularStreamProcessorTopologyTest.java
src/test/java/de/juplo/kafka/wordcount/popular/RankingTest.java
src/test/java/de/juplo/kafka/wordcount/popular/TestData.java

index b25fc07..d732281 100644 (file)
@@ -1,4 +1,4 @@
-package de.juplo.kafka.wordcount.top10;
+package de.juplo.kafka.wordcount.popular;
 
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import lombok.AccessLevel;
index ffac8ea..8307f69 100644 (file)
@@ -1,4 +1,4 @@
-package de.juplo.kafka.wordcount.top10;
+package de.juplo.kafka.wordcount.popular;
 
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import lombok.*;
index 5c14ae7..602f3f6 100644 (file)
@@ -1,14 +1,14 @@
-package de.juplo.kafka.wordcount.top10;
+package de.juplo.kafka.wordcount.popular;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 
 
 @SpringBootApplication
-public class Top10Application
+public class PopularApplication
 {
        public static void main(String[] args)
        {
-               SpringApplication.run(Top10Application.class, args);
+               SpringApplication.run(PopularApplication.class, args);
        }
 }
index 255f0e4..ca312f5 100644 (file)
@@ -1,4 +1,4 @@
-package de.juplo.kafka.wordcount.top10;
+package de.juplo.kafka.wordcount.popular;
 
 import lombok.extern.slf4j.Slf4j;
 import org.apache.kafka.clients.consumer.ConsumerConfig;
@@ -16,17 +16,17 @@ import org.springframework.kafka.support.serializer.JsonSerde;
 import java.util.Properties;
 import java.util.concurrent.CompletableFuture;
 
-import static de.juplo.kafka.wordcount.top10.Top10StreamProcessor.STORE_NAME;
+import static de.juplo.kafka.wordcount.popular.PopularStreamProcessor.STORE_NAME;
 import static org.apache.kafka.streams.errors.StreamsUncaughtExceptionHandler.StreamThreadExceptionResponse.SHUTDOWN_CLIENT;
 
 
 @Configuration
-@EnableConfigurationProperties(Top10ApplicationProperties.class)
+@EnableConfigurationProperties(PopularApplicationProperties.class)
 @Slf4j
-public class Top10ApplicationConfiguration
+public class PopularApplicationConfiguration
 {
        @Bean
-       public Properties streamProcessorProperties(Top10ApplicationProperties properties)
+       public Properties streamProcessorProperties(PopularApplicationProperties properties)
        {
                Properties props = new Properties();
 
@@ -64,13 +64,13 @@ public class Top10ApplicationConfiguration
        }
 
        @Bean(initMethod = "start", destroyMethod = "stop")
-       public Top10StreamProcessor streamProcessor(
-                       Top10ApplicationProperties applicationProperties,
+       public PopularStreamProcessor streamProcessor(
+                       PopularApplicationProperties applicationProperties,
                        Properties streamProcessorProperties,
                        KeyValueBytesStoreSupplier storeSupplier,
                        ConfigurableApplicationContext context)
        {
-               Top10StreamProcessor streamProcessor = new Top10StreamProcessor(
+               PopularStreamProcessor streamProcessor = new PopularStreamProcessor(
                                applicationProperties.getInputTopic(),
                                applicationProperties.getOutputTopic(),
                                streamProcessorProperties,
index d3bb236..26c6240 100644 (file)
@@ -1,4 +1,4 @@
-package de.juplo.kafka.wordcount.top10;
+package de.juplo.kafka.wordcount.popular;
 
 
 import lombok.Getter;
@@ -11,7 +11,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
 @Getter
 @Setter
 @ToString
-public class Top10ApplicationProperties
+public class PopularApplicationProperties
 {
   private String bootstrapServer = "localhost:9092";
   private String applicationId = "top10";
index 70ead87..4320d35 100644 (file)
@@ -1,4 +1,4 @@
-package de.juplo.kafka.wordcount.top10;
+package de.juplo.kafka.wordcount.popular;
 
 import lombok.extern.slf4j.Slf4j;
 import org.apache.kafka.streams.*;
@@ -11,20 +11,20 @@ import java.util.Properties;
 
 
 @Slf4j
-public class Top10StreamProcessor
+public class PopularStreamProcessor
 {
        public static final String STORE_NAME= "top10";
 
        public final KafkaStreams streams;
 
 
-       public Top10StreamProcessor(
+       public PopularStreamProcessor(
                        String inputTopic,
                        String outputTopic,
                        Properties props,
                        KeyValueBytesStoreSupplier storeSupplier)
        {
-               Topology topology = Top10StreamProcessor.buildTopology(
+               Topology topology = PopularStreamProcessor.buildTopology(
                                inputTopic,
                                outputTopic,
                                storeSupplier);
index 53c258d..1ebea23 100644 (file)
@@ -1,4 +1,4 @@
-package de.juplo.kafka.wordcount.top10;
+package de.juplo.kafka.wordcount.popular;
 
 import lombok.AllArgsConstructor;
 import lombok.Data;
index f5ef236..63f7955 100644 (file)
@@ -1,4 +1,4 @@
-package de.juplo.kafka.wordcount.top10;
+package de.juplo.kafka.wordcount.popular;
 
 import de.juplo.kafka.wordcount.counter.TestCounter;
 import de.juplo.kafka.wordcount.counter.TestWord;
@@ -28,7 +28,7 @@ import org.springframework.util.MultiValueMap;
 
 import java.time.Duration;
 
-import static de.juplo.kafka.wordcount.top10.Top10StreamProcessor.STORE_NAME;
+import static de.juplo.kafka.wordcount.popular.PopularStreamProcessor.STORE_NAME;
 import static org.awaitility.Awaitility.await;
 
 
@@ -48,11 +48,11 @@ import static org.awaitility.Awaitility.await;
                                "juplo.wordcount.top10.bootstrap-server=${spring.embedded.kafka.brokers}",
                                "juplo.wordcount.top10.commit-interval=100",
                                "juplo.wordcount.top10.cacheMaxBytes=0",
-                               "juplo.wordcount.top10.input-topic=" + Top10ApplicationIT.TOPIC_IN,
-                               "juplo.wordcount.top10.output-topic=" + Top10ApplicationIT.TOPIC_OUT })
-@EmbeddedKafka(topics = { Top10ApplicationIT.TOPIC_IN, Top10ApplicationIT.TOPIC_OUT })
+                               "juplo.wordcount.top10.input-topic=" + PopularApplicationIT.TOPIC_IN,
+                               "juplo.wordcount.top10.output-topic=" + PopularApplicationIT.TOPIC_OUT })
+@EmbeddedKafka(topics = { PopularApplicationIT.TOPIC_IN, PopularApplicationIT.TOPIC_OUT })
 @Slf4j
-public class Top10ApplicationIT
+public class PopularApplicationIT
 {
        public static final String TOPIC_IN = "in";
        public static final String TOPIC_OUT = "out";
@@ -60,7 +60,7 @@ public class Top10ApplicationIT
        @Autowired
        Consumer consumer;
        @Autowired
-       Top10StreamProcessor streamProcessor;
+       PopularStreamProcessor streamProcessor;
 
 
        @BeforeAll
index 90d8e4c..0588b00 100644 (file)
@@ -1,4 +1,4 @@
-package de.juplo.kafka.wordcount.top10;
+package de.juplo.kafka.wordcount.popular;
 
 import de.juplo.kafka.wordcount.counter.TestCounter;
 import de.juplo.kafka.wordcount.counter.TestWord;
@@ -21,11 +21,11 @@ import org.springframework.util.MultiValueMap;
 
 import java.util.Map;
 
-import static de.juplo.kafka.wordcount.top10.Top10ApplicationConfiguration.serializationConfig;
+import static de.juplo.kafka.wordcount.popular.PopularApplicationConfiguration.serializationConfig;
 
 
 @Slf4j
-public class Top10StreamProcessorTopologyTest
+public class PopularStreamProcessorTopologyTest
 {
   public static final String IN = "TEST-IN";
   public static final String OUT = "TEST-OUT";
@@ -40,7 +40,7 @@ public class Top10StreamProcessorTopologyTest
   @BeforeEach
   public void setUp()
   {
-    Topology topology = Top10StreamProcessor.buildTopology(
+    Topology topology = PopularStreamProcessor.buildTopology(
         IN,
         OUT,
         Stores.inMemoryKeyValueStore(STORE_NAME));
index 26749e9..d8c6a0e 100644 (file)
@@ -1,4 +1,4 @@
-package de.juplo.kafka.wordcount.top10;
+package de.juplo.kafka.wordcount.popular;
 
 import org.junit.jupiter.api.DisplayName;
 import org.junit.jupiter.api.Test;
index 7a3a27e..8fa0512 100644 (file)
@@ -1,4 +1,4 @@
-package de.juplo.kafka.wordcount.top10;
+package de.juplo.kafka.wordcount.popular;
 
 import de.juplo.kafka.wordcount.counter.TestCounter;
 import de.juplo.kafka.wordcount.counter.TestWord;