From 5038c12bcd062a89dc17e2d0f33aff75e284bbee Mon Sep 17 00:00:00 2001 From: Ruud van Vliet Date: Fri, 2 Dec 2022 09:17:58 +0100 Subject: [PATCH 1/3] protobuf from 3.3.0 to 3.21.9 org.slf4j from 1.7.25 to 2.0.4 ch.qos.logback from 1.2.2 to 1.4.5 kafka-clients from 0.10.2.1 to 3.3.1 commented out as it does not exist updated repository to registry.cp.kpn-dsh.com/training/tenant-example --- pom.xml | 378 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 189 insertions(+), 189 deletions(-) diff --git a/pom.xml b/pom.xml index 43884ba..3fc5cc6 100644 --- a/pom.xml +++ b/pom.xml @@ -1,192 +1,192 @@ - 4.0.0 - com.kpn-dsh - tenant-example - 1.0.1-SNAPSHOT - - dshdemo1 - 1.5.0.Final - 3.3.0 - 1.7.25 - 1.2.2 - - - - - com.google.protobuf - protobuf-java - ${protobuf.version} - - - - org.apache.kafka - kafka-clients - 0.10.2.1 - - - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - - - org.slf4j - jcl-over-slf4j - ${org.slf4j.version} - - - ch.qos.logback - logback-classic - ${ch.qos.logback.version} - - - com.uber.jaeger - jaeger-core - 0.26.0 - - - - ${project.basedir}/src/main/java - - - ${project.basedir}/src/main/java - - - ${project.basedir}/src/main/resources - - - ${project.basedir}/target/classes - ${project.basedir}/src/test/java - - - ${project.basedir}/src/test/java - - - ${project.basedir}/src/test/resources - true - - - ${project.basedir}/target/test-classes - - - kr.motd.maven - os-maven-plugin - ${os-maven-plugin.version} - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.5.1 - - 1.7 - 1.7 - utf-8 - 1.7 - -Xlint:all - true - true - javac - - - - org.xolstice.maven.plugins - protobuf-maven-plugin - 0.5.0 - - com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier} - - true - - - - compile - test-compile - - - - - - - maven-assembly-plugin - 3.0.0 - - - jar-with-dependencies - - - - com.kpn.dsh.example.Main - - - - - - make-assembly - - package - - - single - - - - - - maven-dependency-plugin - - - initialize - - copy-dependencies - - - false - runtime - ${project.build.directory}/lib - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.0 - - - - true - lib/ - com.kpn.dsh.example.Main - - - - - - com.spotify - dockerfile-maven-plugin - 1.3.3 - - - default - - build - push - - - - - dataserviceshub-docker-${tenant}.jfrog.io/tenant-example - ${project.version} - - ${project.version} - - - - - + 4.0.0 + com.kpn-dsh + tenant-example + 1.0.1-SNAPSHOT + + dshdemo1 + 1.5.0.Final + 3.21.9 + 2.0.4 + 1.4.5 + + + + + com.google.protobuf + protobuf-java + ${protobuf.version} + + + + org.apache.kafka + kafka-clients + 3.3.1 + + + + org.slf4j + log4j-over-slf4j + ${org.slf4j.version} + + + org.slf4j + jcl-over-slf4j + ${org.slf4j.version} + + + ch.qos.logback + logback-classic + ${ch.qos.logback.version} + + + com.uber.jaeger + jaeger-core + 0.26.0 + + + + ${project.basedir}/src/main/java + + + ${project.basedir}/src/main/java + + + ${project.basedir}/src/main/resources + + + ${project.basedir}/target/classes + + + + ${project.basedir}/src/test/java + + + ${project.basedir}/src/test/resources + true + + + ${project.basedir}/target/test-classes + + + kr.motd.maven + os-maven-plugin + ${os-maven-plugin.version} + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.7 + 1.7 + utf-8 + 1.7 + -Xlint:all + true + true + javac + + + + org.xolstice.maven.plugins + protobuf-maven-plugin + 0.5.0 + + com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier} + + true + + + + compile + test-compile + + + + + + + maven-assembly-plugin + 3.0.0 + + + jar-with-dependencies + + + + com.kpn.dsh.example.Main + + + + + + make-assembly + + package + + + single + + + + + + maven-dependency-plugin + + + initialize + + copy-dependencies + + + false + runtime + ${project.build.directory}/lib + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.0 + + + + true + lib/ + com.kpn.dsh.example.Main + + + + + + com.spotify + dockerfile-maven-plugin + 1.3.3 + + + default + + build + push + + + + + registry.cp.kpn-dsh.com/training/tenant-example + ${project.version} + + ${project.version} + + + + + From 526c0641db02a1c77f752ea56841b487761da069 Mon Sep 17 00:00:00 2001 From: Ruud van Vliet Date: Fri, 2 Dec 2022 09:33:38 +0100 Subject: [PATCH 2/3] correct java location in docker-entrypoint.sh --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index e3433cd..815236d 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -11,4 +11,4 @@ export PKI_KEYSTORE export PKI_STOREPASS export PKI_KEYPASS -exec /usr/bin/java -jar /usr/share/tenant-example/tenant-example.jar +exec /usr/local/openjdk-8/bin/java -jar /usr/share/tenant-example/tenant-example.jar From 0ca21a47e9788078d37354c920182d94e0838297 Mon Sep 17 00:00:00 2001 From: Ruud van Vliet Date: Thu, 8 Dec 2022 13:10:33 +0100 Subject: [PATCH 3/3] update com.uber.jaeger to io.jaegertracing downgraded kafka-clients to 2.8.2 update of dataserviceshub-docker-dshdemo1.jfrog.io to registry.cp.kpn-dsh.com/training in tenant-example.json --- pom.xml | 11 ++++++----- src/main/java/com/kpn/dsh/example/Main.java | 14 ++++++-------- tenant-example.json | 6 +++--- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 3fc5cc6..8ac34cf 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.apache.kafka kafka-clients - 3.3.1 + 2.8.2 @@ -40,10 +40,11 @@ logback-classic ${ch.qos.logback.version} + - com.uber.jaeger + io.jaegertracing jaeger-core - 0.26.0 + 1.8.1 @@ -81,8 +82,8 @@ maven-compiler-plugin 3.5.1 - 1.7 - 1.7 + 8 + 8 utf-8 1.7 -Xlint:all diff --git a/src/main/java/com/kpn/dsh/example/Main.java b/src/main/java/com/kpn/dsh/example/Main.java index 1dbbadb..daeb836 100644 --- a/src/main/java/com/kpn/dsh/example/Main.java +++ b/src/main/java/com/kpn/dsh/example/Main.java @@ -1,15 +1,15 @@ package com.kpn.dsh.example; import com.kpn.dsh.messages.common.Envelope.DataEnvelope; +import com.kpn.dsh.messages.common.Envelope.Identity; import com.kpn.dsh.messages.common.Envelope.KeyEnvelope; -import com.uber.jaeger.Configuration; -import com.uber.jaeger.reporters.Reporter; +import com.kpn.dsh.messages.common.Envelope.KeyHeader; +import io.jaegertracing.Configuration; import io.opentracing.References; import io.opentracing.Span; import io.opentracing.SpanContext; import io.opentracing.propagation.Format; -import io.opentracing.propagation.TextMapExtractAdapter; -import io.opentracing.propagation.TextMapInjectAdapter; +import io.opentracing.propagation.TextMapAdapter; import io.opentracing.util.GlobalTracer; import org.apache.kafka.clients.consumer.ConsumerRebalanceListener; import org.apache.kafka.clients.consumer.ConsumerRecord; @@ -20,8 +20,6 @@ import org.apache.kafka.common.TopicPartition; import org.apache.kafka.common.errors.WakeupException; -import com.kpn.dsh.messages.common.Envelope.*; - import java.io.FileInputStream; import java.io.InputStream; import java.nio.charset.Charset; @@ -83,7 +81,7 @@ public static DataEnvelope wrapData(String data, Span span) { return DataEnvelopeSerializer.wrap(asBytes); } HashMap trace=new HashMap<>(); - GlobalTracer.get().inject(span.context(), Format.Builtin.TEXT_MAP, new TextMapInjectAdapter(trace)); + GlobalTracer.get().inject(span.context(), Format.Builtin.TEXT_MAP, new TextMapAdapter(trace)); return DataEnvelopeSerializer.wrap(asBytes, trace); } @@ -92,7 +90,7 @@ public static SpanContext spanContextFromDataEnvelope(DataEnvelope d) { if (d.getTracingMap().size() == 0) { return null; } - return GlobalTracer.get().extract(Format.Builtin.TEXT_MAP, new TextMapExtractAdapter(d.getTracingMap())); + return GlobalTracer.get().extract(Format.Builtin.TEXT_MAP, new TextMapAdapter(d.getTracingMap())); } // creates a span that covers the period between message creation and now diff --git a/tenant-example.json b/tenant-example.json index 08f12bc..91b7012 100644 --- a/tenant-example.json +++ b/tenant-example.json @@ -1,11 +1,11 @@ { - "image": "dataserviceshub-docker-dshdemo1.jfrog.io/tenant-example:1.0.1-SNAPSHOT", + "image": "registry.cp.kpn-dsh.com/training/tenant-example:1.0.1-SNAPSHOT", "instances": 1, "cpus": 0.5, "mem": 1024, "env": { - "INPUT_STREAM": "stream.dshdemoshared", - "OUTPUT_STREAM": "stream.dshdemoshared", + "INPUT_STREAM": "stream.training", + "OUTPUT_STREAM": "stream.training", "JAEGER_SERVICE_NAME": "tenant-example", "JAEGER_SAMPLER_TYPE": "const", "JAEGER_SAMPLER_PARAM": "1",