From 570184a5d53d80dae39c3f701e747c65e7967165 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 22 Oct 2021 23:02:26 +0200 Subject: [PATCH] WIP --- Dockerfile | 2 +- pom.xml | 6 +++--- .../{recorder => splitter}/SplitterApplication.java | 2 +- .../SplitterApplicationProperties.java | 2 +- .../{recorder => splitter}/SplitterStreamProcessor.java | 4 +--- src/main/resources/application.properties | 2 +- .../wordcount/{recorder => splitter}/ApplicationTests.java | 2 +- 7 files changed, 9 insertions(+), 11 deletions(-) rename src/main/java/de/juplo/kafka/wordcount/{recorder => splitter}/SplitterApplication.java (98%) rename src/main/java/de/juplo/kafka/wordcount/{recorder => splitter}/SplitterApplicationProperties.java (91%) rename src/main/java/de/juplo/kafka/wordcount/{recorder => splitter}/SplitterStreamProcessor.java (97%) rename src/test/java/de/juplo/kafka/wordcount/{recorder => splitter}/ApplicationTests.java (80%) diff --git a/Dockerfile b/Dockerfile index 9c0b843..803477f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM openjdk:11-jre-slim COPY target/*.jar /opt/app.jar -EXPOSE 8081 +EXPOSE 8086 ENTRYPOINT ["java", "-jar", "/opt/app.jar"] CMD [] diff --git a/pom.xml b/pom.xml index 16475de..fee0245 100644 --- a/pom.xml +++ b/pom.xml @@ -9,10 +9,10 @@ de.juplo.kafka.wordcount - kafka-splitter - 1.0.0 + splitter + 1.0.0-vanilla-kafka Wordcount-Splitter - Stream-processor of the multi-user wordcount-example, that splits the sentences up into single words + A version of the stream-processor for the multi-user wordcount-example, that splits the sentences up into single words, that is implemented in Vanilla-Kafka (without Kafka Streams) 0.33.0 11 diff --git a/src/main/java/de/juplo/kafka/wordcount/recorder/SplitterApplication.java b/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterApplication.java similarity index 98% rename from src/main/java/de/juplo/kafka/wordcount/recorder/SplitterApplication.java rename to src/main/java/de/juplo/kafka/wordcount/splitter/SplitterApplication.java index da17c3d..b7a94dd 100644 --- a/src/main/java/de/juplo/kafka/wordcount/recorder/SplitterApplication.java +++ b/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterApplication.java @@ -1,4 +1,4 @@ -package de.juplo.kafka.wordcount.recorder; +package de.juplo.kafka.wordcount.splitter; import org.apache.kafka.clients.consumer.ConsumerConfig; import org.apache.kafka.clients.consumer.KafkaConsumer; diff --git a/src/main/java/de/juplo/kafka/wordcount/recorder/SplitterApplicationProperties.java b/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterApplicationProperties.java similarity index 91% rename from src/main/java/de/juplo/kafka/wordcount/recorder/SplitterApplicationProperties.java rename to src/main/java/de/juplo/kafka/wordcount/splitter/SplitterApplicationProperties.java index 4983a9d..f699f32 100644 --- a/src/main/java/de/juplo/kafka/wordcount/recorder/SplitterApplicationProperties.java +++ b/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterApplicationProperties.java @@ -1,4 +1,4 @@ -package de.juplo.kafka.wordcount.recorder; +package de.juplo.kafka.wordcount.splitter; import lombok.Getter; diff --git a/src/main/java/de/juplo/kafka/wordcount/recorder/SplitterStreamProcessor.java b/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterStreamProcessor.java similarity index 97% rename from src/main/java/de/juplo/kafka/wordcount/recorder/SplitterStreamProcessor.java rename to src/main/java/de/juplo/kafka/wordcount/splitter/SplitterStreamProcessor.java index 92a544b..dab15f8 100644 --- a/src/main/java/de/juplo/kafka/wordcount/recorder/SplitterStreamProcessor.java +++ b/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterStreamProcessor.java @@ -1,4 +1,4 @@ -package de.juplo.kafka.wordcount.recorder; +package de.juplo.kafka.wordcount.splitter; import lombok.extern.slf4j.Slf4j; import org.apache.kafka.clients.consumer.ConsumerRebalanceListener; @@ -11,8 +11,6 @@ import org.apache.kafka.common.TopicPartition; import org.apache.kafka.common.errors.WakeupException; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; import javax.annotation.PreDestroy; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 28d43c9..3046fc3 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,2 +1,2 @@ -server.port=8081 +server.port=8086 management.endpoints.web.exposure.include=* diff --git a/src/test/java/de/juplo/kafka/wordcount/recorder/ApplicationTests.java b/src/test/java/de/juplo/kafka/wordcount/splitter/ApplicationTests.java similarity index 80% rename from src/test/java/de/juplo/kafka/wordcount/recorder/ApplicationTests.java rename to src/test/java/de/juplo/kafka/wordcount/splitter/ApplicationTests.java index 885a408..77266a9 100644 --- a/src/test/java/de/juplo/kafka/wordcount/recorder/ApplicationTests.java +++ b/src/test/java/de/juplo/kafka/wordcount/splitter/ApplicationTests.java @@ -1,4 +1,4 @@ -package de.juplo.kafka.wordcount.recorder; +package de.juplo.kafka.wordcount.splitter; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -- 2.20.1