diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 90effd8588932aca1b1ff6591ccceeda1854908e..f9ac712bd1c2fb00225cd84aa1f5a5eda9fb0ded 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,6 +25,11 @@ build: tags: - exec-docker script: ./gradlew --build-cache assemble + artifacts: + paths: + - "build/libs/*.jar" + - "*/build/distributions/*.tar" + expire_in: 1 day test: stage: test @@ -76,7 +81,7 @@ spotbugs: .deploy: stage: deploy tags: - - exec-docker + - exec-dind # see https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled # for image usage and settings for building with TLS and docker in docker image: docker:19.03.1 @@ -86,14 +91,138 @@ spotbugs: DOCKER_TLS_CERTDIR: "/certs" script: - DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//') - - docker build --pull -t titan-ccp-exp-bigdata19-bridge ./exp-bigdata19-bridge - - docker tag titan-ccp-exp-bigdata19-bridge $DOCKERHUB_ORG/titan-ccp-exp-bigdata19-bridge:${DOCKER_TAG_NAME}latest - - docker tag titan-ccp-exp-bigdata19-bridge $DOCKERHUB_ORG/titan-ccp-exp-bigdata19-bridge:$DOCKER_TAG_NAME$CI_COMMIT_SHA + - docker build --pull -t $IMAGE_NAME ./$JAVA_PROJECT_NAME + - docker tag $IMAGE_NAME $DOCKERHUB_ORG/$IMAGE_NAME:${DOCKER_TAG_NAME}latest + - docker tag $IMAGE_NAME $DOCKERHUB_ORG/$IMAGE_NAME:$DOCKER_TAG_NAME$CI_COMMIT_SHORT_SHA - echo $DOCKERHUB_PW | docker login -u $DOCKERHUB_ID --password-stdin - - docker push $DOCKERHUB_ORG/titan-ccp-exp-bigdata19-bridge + - docker push $DOCKERHUB_ORG/$IMAGE_NAME - docker logout - only: - variables: - - $DOCKERHUB_ORG - - $DOCKERHUB_ID - - $DOCKERHUB_PW + rules: + - changes: + # - $JAVA_PROJECT_NAME/**/* # hope this can be simplified soon, see #51 + - application-kafkastreams-commons/**/* + if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: always + - if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: manual + allow_failure: true + +deploy-uc1-kstreams-app: + extends: .deploy + variables: + IMAGE_NAME: "theodolite-uc1-kstreams-app" + JAVA_PROJECT_NAME: "uc1-application" + rules: # hope this can be simplified soon, see #51 + - changes: + - uc1-application/**/* + - application-kafkastreams-commons/**/* + if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: always + - if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: manual + allow_failure: true + +deploy-uc2-kstreams-app: + extends: .deploy + variables: + IMAGE_NAME: "theodolite-uc2-kstreams-app" + JAVA_PROJECT_NAME: "uc2-application" + rules: # hope this can be simplified soon, see #51 + - changes: + - uc2-application/**/* + - application-kafkastreams-commons/**/* + if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: always + - if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: manual + allow_failure: true + +deploy-uc3-kstreams-app: + extends: .deploy + variables: + IMAGE_NAME: "theodolite-uc3-kstreams-app" + JAVA_PROJECT_NAME: "uc3-application" + rules: # hope this can be simplified soon, see #51 + - changes: + - uc3-application/**/* + - application-kafkastreams-commons/**/* + if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: always + - if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: manual + allow_failure: true + +deploy-uc4-kstreams-app: + extends: .deploy + variables: + IMAGE_NAME: "theodolite-uc4-kstreams-app" + JAVA_PROJECT_NAME: "uc4-application" + rules: # hope this can be simplified soon, see #51 + - changes: + - uc4-application/**/* + - application-kafkastreams-commons/**/* + if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: always + - if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: manual + allow_failure: true + +deploy-uc1-workload-generator: + extends: .deploy + variables: + IMAGE_NAME: "theodolite-uc1-workload-generator" + JAVA_PROJECT_NAME: "uc1-workload-generator" + rules: # hope this can be simplified soon, see #51 + - changes: + - uc1-workload-generator/**/* + - application-kafkastreams-commons/**/* + if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: always + - if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: manual + allow_failure: true + +deploy-uc2-workload-generator: + extends: .deploy + variables: + IMAGE_NAME: "theodolite-uc2-workload-generator" + JAVA_PROJECT_NAME: "uc2-workload-generator" + rules: # hope this can be simplified soon, see #51 + - changes: + - uc2-workload-generator/**/* + - application-kafkastreams-commons/**/* + if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: always + - if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: manual + allow_failure: true + +deploy-uc3-workload-generator: + extends: .deploy + variables: + IMAGE_NAME: "theodolite-uc3-workload-generator" + JAVA_PROJECT_NAME: "uc3-workload-generator" + rules: # hope this can be simplified soon, see #51 + - changes: + - uc3-workload-generator/**/* + - application-kafkastreams-commons/**/* + if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: always + - if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: manual + allow_failure: true + +deploy-uc4-workload-generator: + extends: .deploy + variables: + IMAGE_NAME: "theodolite-uc4-workload-generator" + JAVA_PROJECT_NAME: "uc4-workload-generator" + rules: # hope this can be simplified soon, see #51 + - changes: + - uc4-workload-generator/**/* + - application-kafkastreams-commons/**/* + if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: always + - if: "$DOCKERHUB_ORG && $DOCKERHUB_ID && $DOCKERHUB_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME" + when: manual + allow_failure: true diff --git a/execution/infrastructure/kafka/values.yaml b/execution/infrastructure/kafka/values.yaml index a33a6f21f8529377162704fbabc7a381706ad64e..51dcb09d5f24579b148811c8a1c27fe165c3fb56 100644 --- a/execution/infrastructure/kafka/values.yaml +++ b/execution/infrastructure/kafka/values.yaml @@ -13,16 +13,6 @@ cp-zookeeper: heapOptions: "-Xms512M -Xmx512M" persistence: enabled: false - ## The size of the PersistentVolume to allocate to each Zookeeper Pod in the StatefulSet. For - ## production servers this number should likely be much larger. - ## - ## Size for Data dir, where ZooKeeper will store the in-memory database snapshots. - dataDirSize: 10Gi - # dataDirStorageClass: "" - - ## Size for data log dir, which is a dedicated log device to be used, and helps avoid competition between logging and snaphots. - dataLogDirSize: 10Gi - # dataLogDirStorageClass: "" resources: {} ## If you do want to specify resources, uncomment the following lines, adjust them as necessary, ## and remove the curly braces after 'resources:' @@ -48,9 +38,6 @@ cp-kafka: heapOptions: "-Xms512M -Xmx512M" persistence: enabled: false - # storageClass: "" - size: 5Gi - disksPerBroker: 1 resources: {} ## If you do want to specify resources, uncomment the following lines, adjust them as necessary, ## and remove the curly braces after 'resources:' @@ -92,83 +79,14 @@ cp-schema-registry: # cpu: 100m # memory: 128Mi -## ------------------------------------------------------ -## REST Proxy -## ------------------------------------------------------ cp-kafka-rest: enabled: false - image: confluentinc/cp-kafka-rest - imageTag: 5.4.0 - ## Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace. - ## https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod - imagePullSecrets: - # - name: "regcred" - heapOptions: "-Xms512M -Xmx512M" - resources: {} - ## If you do want to specify resources, uncomment the following lines, adjust them as necessary, - ## and remove the curly braces after 'resources:' - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi -## ------------------------------------------------------ -## Kafka Connect -## ------------------------------------------------------ cp-kafka-connect: enabled: false - image: confluentinc/cp-kafka-connect - imageTag: 5.4.0 - ## Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace. - ## https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod - imagePullSecrets: - # - name: "regcred" - heapOptions: "-Xms512M -Xmx512M" - resources: {} - ## If you do want to specify resources, uncomment the following lines, adjust them as necessary, - ## and remove the curly braces after 'resources:' - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi -## ------------------------------------------------------ -## KSQL Server -## ------------------------------------------------------ cp-ksql-server: enabled: false - image: confluentinc/cp-ksql-server - imageTag: 5.4.0 - ## Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace. - ## https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod - imagePullSecrets: - # - name: "regcred" - heapOptions: "-Xms512M -Xmx512M" - ksql: - headless: false -## ------------------------------------------------------ -## Control Center -## ------------------------------------------------------ cp-control-center: enabled: false - image: confluentinc/cp-enterprise-control-center - imageTag: 5.2.0 - ## Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace. - ## https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod - imagePullSecrets: - # - name: "regcred" - heapOptions: "-Xms512M -Xmx512M" - resources: {} - ## If you do want to specify resources, uncomment the following lines, adjust them as necessary, - ## and remove the curly braces after 'resources:' - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi diff --git a/execution/run_uc1-new.sh b/execution/run_uc1-new.sh index 15bef5f13905876f64644bfbdb97930536255a73..04eb86edc9bb5653f3281793bf48655bca643391 100755 --- a/execution/run_uc1-new.sh +++ b/execution/run_uc1-new.sh @@ -74,9 +74,9 @@ echo "$APPLICATION_YAML" | kubectl delete -f - #kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input,output,configuration,titan-.*'" echo "Finished execution, print topics:" #kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -E '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p' -while test $(kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -E '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p' | wc -l) -gt 0 +while test $(kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -E '/^(theodolite-.*|input|output|configuration)( - marked for deletion)?$/p' | wc -l) -gt 0 do - kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input|output|configuration|titan-.*'" + kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input|output|configuration|theodolite-.*'" echo "Wait for topic deletion" sleep 5s #echo "Finished waiting, print topics:" diff --git a/execution/run_uc2-new.sh b/execution/run_uc2-new.sh index 1ec781ace658457636d67ad1ad00fb29e3260f46..c0bbf313b1f598ec3b4107fdc4ebb257c4eb7c21 100755 --- a/execution/run_uc2-new.sh +++ b/execution/run_uc2-new.sh @@ -67,9 +67,9 @@ echo "$APPLICATION_YAML" | kubectl delete -f - #kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input,output,configuration,titan-.*'" echo "Finished execution, print topics:" #kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -E '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p' -while test $(kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -E '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p' | wc -l) -gt 0 +while test $(kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -E '/^(theodolite-.*|input|output|configuration)( - marked for deletion)?$/p' | wc -l) -gt 0 do - kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input|output|configuration|titan-.*'" + kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input|output|configuration|theodolite-.*'" echo "Wait for topic deletion" sleep 5s #echo "Finished waiting, print topics:" diff --git a/execution/run_uc3-new.sh b/execution/run_uc3-new.sh index 2295d615332077361e3ad5fd29bdb1e5d2c47893..f214e20b3af93b0f89d76d6ea50ce3d7cd428ded 100755 --- a/execution/run_uc3-new.sh +++ b/execution/run_uc3-new.sh @@ -75,9 +75,9 @@ echo "$APPLICATION_YAML" | kubectl delete -f - #kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input,output,configuration,titan-.*'" echo "Finished execution, print topics:" #kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -E '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p' -while test $(kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -E '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p' | wc -l) -gt 0 +while test $(kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -E '/^(theodolite-.*|input|output|configuration)( - marked for deletion)?$/p' | wc -l) -gt 0 do - kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input|output|configuration|titan-.*'" + kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input|output|configuration|theodolite-.*'" echo "Wait for topic deletion" sleep 5s #echo "Finished waiting, print topics:" diff --git a/execution/run_uc4-new.sh b/execution/run_uc4-new.sh index cec4fd9c45e1fd044e093f6fa0786b55b16d3065..2a3936b711ce4115ab9cf0c484a7fc57cecd1800 100755 --- a/execution/run_uc4-new.sh +++ b/execution/run_uc4-new.sh @@ -70,9 +70,9 @@ echo "$APPLICATION_YAML" | kubectl delete -f - #kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input,output,configuration,titan-.*'" echo "Finished execution, print topics:" #kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -E '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p' -while test $(kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -E '/^(titan-.*|input|output|configuration)( - marked for deletion)?$/p' | wc -l) -gt 0 +while test $(kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --list" | sed -n -E '/^(theodolite-.*|input|output|configuration)( - marked for deletion)?$/p' | wc -l) -gt 0 do - kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input|output|configuration|titan-.*'" + kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input|output|configuration|theodolite-.*'" echo "Wait for topic deletion" sleep 5s #echo "Finished waiting, print topics:" diff --git a/uc1-application/src/main/resources/META-INF/application.properties b/uc1-application/src/main/resources/META-INF/application.properties index 8f029be66f9decadc87c8e88f58698d1422d596d..9dcbb9a64be111c2ea1db006081b983c9007b140 100644 --- a/uc1-application/src/main/resources/META-INF/application.properties +++ b/uc1-application/src/main/resources/META-INF/application.properties @@ -1,5 +1,5 @@ -application.name="uc1-application" -application.version="0.0.1" +application.name=theodolite-uc1-application +application.version=0.0.1 kafka.bootstrap.servers=localhost:9092 kafka.input.topic=input diff --git a/uc2-application/src/main/java/theodolite/uc2/application/AggregationService.java b/uc2-application/src/main/java/theodolite/uc2/application/AggregationService.java index 2f37bf757aaa4d745a7f3a6416b359da73e2babc..06a6d9ccbf6750290335cd7389391eb613b1569a 100644 --- a/uc2-application/src/main/java/theodolite/uc2/application/AggregationService.java +++ b/uc2-application/src/main/java/theodolite/uc2/application/AggregationService.java @@ -46,6 +46,8 @@ public class AggregationService { // Configuration of the stream application final KafkaStreams kafkaStreams = uc2KafkaStreamsBuilder + .applicationName(this.config.getString(ConfigurationKeys.APPLICATION_NAME)) + .applicationVersion(this.config.getString(ConfigurationKeys.APPLICATION_VERSION)) .bootstrapServers(this.config.getString(ConfigurationKeys.KAFKA_BOOTSTRAP_SERVERS)) .numThreads(this.config.getInt(ConfigurationKeys.NUM_THREADS)) .commitIntervalMs(this.config.getInt(ConfigurationKeys.COMMIT_INTERVAL_MS)) diff --git a/uc2-application/src/main/java/theodolite/uc2/application/ConfigurationKeys.java b/uc2-application/src/main/java/theodolite/uc2/application/ConfigurationKeys.java index b57f5c38e79f04098bb6fc2a8c861c4655daa8a6..78d72af1d3eb3585606d349166f6bafdf1048b48 100644 --- a/uc2-application/src/main/java/theodolite/uc2/application/ConfigurationKeys.java +++ b/uc2-application/src/main/java/theodolite/uc2/application/ConfigurationKeys.java @@ -4,6 +4,9 @@ package theodolite.uc2.application; * Keys to access configuration parameters. */ public final class ConfigurationKeys { + public static final String APPLICATION_NAME = "application.name"; + + public static final String APPLICATION_VERSION = "application.version"; public static final String CONFIGURATION_KAFKA_TOPIC = "configuration.kafka.topic"; diff --git a/uc2-application/src/main/resources/META-INF/application.properties b/uc2-application/src/main/resources/META-INF/application.properties index 3aa519c50f5a4be124600e9ad0c13dc27277092a..f9a5225680f638239e637e99bf8d65152d15764d 100644 --- a/uc2-application/src/main/resources/META-INF/application.properties +++ b/uc2-application/src/main/resources/META-INF/application.properties @@ -1,3 +1,6 @@ +application.name=theodolite-uc2-application +application.version=0.0.1 + configuration.host=localhost configuration.port=8082 configuration.kafka.topic=configuration diff --git a/uc3-application/src/main/java/theodolite/uc3/application/ConfigurationKeys.java b/uc3-application/src/main/java/theodolite/uc3/application/ConfigurationKeys.java index d95d245e0b354f11abfc40277e088f1a3f205c95..ab6f08c017bb78a72c4896d766b38f7b8485c7fb 100644 --- a/uc3-application/src/main/java/theodolite/uc3/application/ConfigurationKeys.java +++ b/uc3-application/src/main/java/theodolite/uc3/application/ConfigurationKeys.java @@ -5,21 +5,25 @@ package theodolite.uc3.application; */ public final class ConfigurationKeys { - public static final String KAFKA_BOOTSTRAP_SERVERS = "kafka.bootstrap.servers"; + public static final String APPLICATION_NAME = "application.name"; - public static final String KAFKA_OUTPUT_TOPIC = "kafka.output.topic"; + public static final String APPLICATION_VERSION = "application.version"; - public static final String KAFKA_INPUT_TOPIC = "kafka.input.topic"; + public static final String KAFKA_BOOTSTRAP_SERVERS = "kafka.bootstrap.servers"; - public static final String NUM_THREADS = "num.threads"; + public static final String KAFKA_OUTPUT_TOPIC = "kafka.output.topic"; - public static final String COMMIT_INTERVAL_MS = "commit.interval.ms"; + public static final String KAFKA_INPUT_TOPIC = "kafka.input.topic"; - public static final String CACHE_MAX_BYTES_BUFFERING = "cache.max.bytes.buffering"; + public static final String NUM_THREADS = "num.threads"; - public static final String KAFKA_WINDOW_DURATION_MINUTES = "kafka.window.duration.minutes"; + public static final String COMMIT_INTERVAL_MS = "commit.interval.ms"; - private ConfigurationKeys() { - } + public static final String CACHE_MAX_BYTES_BUFFERING = "cache.max.bytes.buffering"; + + public static final String KAFKA_WINDOW_DURATION_MINUTES = "kafka.window.duration.minutes"; + + private ConfigurationKeys() { + } } diff --git a/uc3-application/src/main/java/theodolite/uc3/application/HistoryService.java b/uc3-application/src/main/java/theodolite/uc3/application/HistoryService.java index 916d64f011a742d497a3512dd09da9db080576e5..18aae8c3499643c29901c3ca7461ec707d59c280 100644 --- a/uc3-application/src/main/java/theodolite/uc3/application/HistoryService.java +++ b/uc3-application/src/main/java/theodolite/uc3/application/HistoryService.java @@ -42,6 +42,8 @@ public class HistoryService { // Configuration of the stream application final KafkaStreams kafkaStreams = uc3KafkaStreamsBuilder + .applicationName(this.config.getString(ConfigurationKeys.APPLICATION_NAME)) + .applicationVersion(this.config.getString(ConfigurationKeys.APPLICATION_VERSION)) .bootstrapServers(this.config.getString(ConfigurationKeys.KAFKA_BOOTSTRAP_SERVERS)) .numThreads(this.config.getInt(ConfigurationKeys.NUM_THREADS)) .commitIntervalMs(this.config.getInt(ConfigurationKeys.COMMIT_INTERVAL_MS)) diff --git a/uc3-application/src/main/resources/META-INF/application.properties b/uc3-application/src/main/resources/META-INF/application.properties index ef279332f911108fa8ca42d840d4a147460e8e35..96e2d8b6ff46f3b3ce878b1fec011e9315e118bc 100644 --- a/uc3-application/src/main/resources/META-INF/application.properties +++ b/uc3-application/src/main/resources/META-INF/application.properties @@ -1,3 +1,6 @@ +application.name=theodolite-uc3-application +application.version=0.0.1 + kafka.bootstrap.servers=localhost:9092 kafka.input.topic=input kafka.output.topic=output diff --git a/uc4-application/src/main/java/theodolite/uc4/application/ConfigurationKeys.java b/uc4-application/src/main/java/theodolite/uc4/application/ConfigurationKeys.java index aa74e1552cb4c3c020f511dfb6b53a3f1fd886d7..bc5fee1f2cb4367284e9db60f575f2652b1bd05b 100644 --- a/uc4-application/src/main/java/theodolite/uc4/application/ConfigurationKeys.java +++ b/uc4-application/src/main/java/theodolite/uc4/application/ConfigurationKeys.java @@ -5,6 +5,10 @@ package theodolite.uc4.application; */ public final class ConfigurationKeys { + public static final String APPLICATION_NAME = "application.name"; + + public static final String APPLICATION_VERSION = "application.version"; + public static final String KAFKA_BOOTSTRAP_SERVERS = "kafka.bootstrap.servers"; public static final String KAFKA_INPUT_TOPIC = "kafka.input.topic"; diff --git a/uc4-application/src/main/java/theodolite/uc4/application/HistoryService.java b/uc4-application/src/main/java/theodolite/uc4/application/HistoryService.java index 4d686d8f7f244b9e6dd28b4c39abcb83d9a108b8..3e3073fdeed682ae09e345d9f315585e960a3440 100644 --- a/uc4-application/src/main/java/theodolite/uc4/application/HistoryService.java +++ b/uc4-application/src/main/java/theodolite/uc4/application/HistoryService.java @@ -42,6 +42,8 @@ public class HistoryService { // Configuration of the stream application final KafkaStreams kafkaStreams = uc4KafkaStreamsBuilder + .applicationName(this.config.getString(ConfigurationKeys.APPLICATION_NAME)) + .applicationVersion(this.config.getString(ConfigurationKeys.APPLICATION_VERSION)) .bootstrapServers(this.config.getString(ConfigurationKeys.KAFKA_BOOTSTRAP_SERVERS)) .numThreads(this.config.getInt(ConfigurationKeys.NUM_THREADS)) .commitIntervalMs(this.config.getInt(ConfigurationKeys.COMMIT_INTERVAL_MS)) diff --git a/uc4-application/src/main/resources/META-INF/application.properties b/uc4-application/src/main/resources/META-INF/application.properties index da99d5a623b71b6896eaff17b478285f7d501512..4d4bc7b5a31d811e856f04561c51fc7ac5a970a8 100644 --- a/uc4-application/src/main/resources/META-INF/application.properties +++ b/uc4-application/src/main/resources/META-INF/application.properties @@ -1,3 +1,6 @@ +application.name=theodolite-uc4-application +application.version=0.0.1 + kafka.bootstrap.servers=localhost:9092 kafka.input.topic=input kafka.output.topic=output