From 24f97bbd61b2c6646058a84f5de077cd22bfc255 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 4 Sep 2021 21:12:28 +0200 Subject: [PATCH] Query-results are enriched with user-data --- .gitmodules | 4 ++++ README.sh | 9 +++++++-- docker-compose.yml | 13 ++++++++++++- pom.xml | 1 + query | 2 +- users | 1 + 6 files changed, 26 insertions(+), 4 deletions(-) create mode 160000 users diff --git a/.gitmodules b/.gitmodules index bc2ebe1..04152a2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -18,3 +18,7 @@ path = counter url = ./ branch = counter +[submodule "users"] + path = users + url = ./ + branch = users diff --git a/README.sh b/README.sh index 6b0e566..f6278f8 100755 --- a/README.sh +++ b/README.sh @@ -1,14 +1,16 @@ #!/bin/bash RECORDER=juplo/wordcount--recorder:1.0.0 +USERS=juplo/wordcount--users:1.0.0 COUNTER=juplo/wordcount--counter:1.0.0 TOP10=juplo/wordcount--top10:1.0.0 -QUERY=juplo/wordcount--query:1.0.0 +QUERY=juplo/wordcount--query:1.0.2 if [ "$1" = "cleanup" ] then docker-compose down -v docker image rm $RECORDER + docker image rm $USERS docker image rm $COUNTER docker image rm $TOP10 docker image rm $QUERY @@ -17,6 +19,7 @@ fi if [[ $(docker image ls -q $RECORDER) == "" || + $(docker image ls -q $USERS) == "" || $(docker image ls -q $COUNTER) == "" || $(docker image ls -q $TOP10) == "" || $(docker image ls -q $QUERY) == "" || @@ -25,14 +28,16 @@ if [[ then git submodule update --init mvn clean package || exit - docker-compose rm -svf recorder counter top10 query + docker-compose rm -svf recorder users counter top10 query mvn -f recorder/pom.xml docker:build + mvn -f users/pom.xml docker:build mvn -f counter/pom.xml docker:build mvn -f top10/pom.xml docker:build mvn -f query/pom.xml docker:build else echo "Using existing images:" docker image ls $RECORDER + docker image ls $USERS docker image ls $COUNTER docker image ls $TOP10 docker image ls $QUERY diff --git a/docker-compose.yml b/docker-compose.yml index 01181a7..e07b0fc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,6 +34,16 @@ services: depends_on: - kafka + users: + image: juplo/wordcount--users:1.0.0 + environment: + juplo.wordcount.users.bootstrap-server: kafka:9092 + juplo.wordcount.users.topic: users + ports: + - 8082:8080 + depends_on: + - kafka + counter: image: juplo/wordcount--counter:1.0.0 environment: @@ -59,11 +69,12 @@ services: - kafka query: - image: juplo/wordcount--query:1.0.0 + image: juplo/wordcount--query:1.0.2 environment: juplo.wordcount.query.bootstrap-server: kafka:9092 juplo.wordcount.query.application-id: query juplo.wordcount.query.ranking-input-topic: top10 + juplo.wordcount.query.users-input-topic: users ports: - 8085:8080 depends_on: diff --git a/pom.xml b/pom.xml index fb4601a..37a00c9 100644 --- a/pom.xml +++ b/pom.xml @@ -11,6 +11,7 @@ recorder + users counter top10 query diff --git a/query b/query index 3bfe34e..0d1ed8c 160000 --- a/query +++ b/query @@ -1 +1 @@ -Subproject commit 3bfe34e8bc0539932cf93361fe6f710738b37897 +Subproject commit 0d1ed8c65f422e5c0cd291c35dba67b1f2205997 diff --git a/users b/users new file mode 160000 index 0000000..fc7b9df --- /dev/null +++ b/users @@ -0,0 +1 @@ +Subproject commit fc7b9dfe12a1401e7365d85ec723364750bdcd3d -- 2.20.1