aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-09-18 16:12:01 +0200
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-09-18 16:12:01 +0200
commit256763965c5c06db942928b412a46938138cdb5d (patch)
tree845613c7317e5bdee5675b138f85bba15a69683c
parent24a89793ae63280e58e0715c9807dc8099a389f4 (diff)
Use Java 11 in traversal1.14.7
- switch compiler version and base image to Java 11 - remove com.sun.jersey (Jersey 1) dependencies - replace heap_size jvm args with MaxRAMPercentage to scale dynamically with the K8s limits Issue-ID: AAI-4000 Change-Id: I7db8633593816af495d36eea7b6fc56f1b98e648 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
-rw-r--r--aai-traversal/pom.xml56
-rw-r--r--aai-traversal/src/main/docker/Dockerfile2
-rw-r--r--aai-traversal/src/main/docker/docker-entrypoint.sh14
-rw-r--r--onap-java-formatter.xml6
-rw-r--r--pom.xml4
5 files changed, 16 insertions, 66 deletions
diff --git a/aai-traversal/pom.xml b/aai-traversal/pom.xml
index 96337d5..f572ac5 100644
--- a/aai-traversal/pom.xml
+++ b/aai-traversal/pom.xml
@@ -32,12 +32,12 @@
<artifactId>aai-traversal</artifactId>
<properties>
- <java.version>1.8</java.version>
+ <java.version>11</java.version>
<start-class>org.onap.aai.TraversalApp</start-class>
<maven.skip.tests>true</maven.skip.tests>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
+ <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
<jopt.simple.version>4.9</jopt.simple.version>
@@ -108,6 +108,7 @@
<antlr.version>4.9.3</antlr.version>
<keycloak.version>11.0.2</keycloak.version>
<activemq.version>5.16.7</activemq.version>
+ <io.swagger.version>1.6.14</io.swagger.version>
<micrometer.version>1.6.6</micrometer.version>
<mockito.core.version>3.4.0</mockito.core.version>
@@ -347,37 +348,8 @@
</dependency>
<dependency>
<groupId>io.swagger</groupId>
- <artifactId>swagger-jersey-jaxrs</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.glassfish.jersey.media</groupId>
- <artifactId>jersey-media-multipart</artifactId>
- </exclusion>
- <exclusion>
- <artifactId>jersey-core</artifactId>
- <groupId>com.sun.jersey</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jersey-json</artifactId>
- <groupId>com.sun.jersey</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jersey-server</artifactId>
- <groupId>com.sun.jersey</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jersey-client</artifactId>
- <groupId>com.sun.jersey</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jsr311-api</artifactId>
- <groupId>javax.ws.rs</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jersey-multipart</artifactId>
- <groupId>com.sun.jersey.contribs</groupId>
- </exclusion>
- </exclusions>
+ <artifactId>swagger-jersey2-jaxrs</artifactId>
+ <version>${io.swagger.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
@@ -428,7 +400,7 @@
<groupId>org.janusgraph</groupId>
<artifactId>janusgraph-inmemory</artifactId>
<version>${janusgraph.version}</version>
- </dependency>
+ </dependency>
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-ffi</artifactId>
@@ -501,14 +473,6 @@
<artifactId>aai-aaf-auth</artifactId>
</exclusion>
<exclusion>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-mapper-asl</artifactId>
- </exclusion>
- <exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
</exclusion>
@@ -533,12 +497,6 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
- <exclusions>
- <exclusion>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-core</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.onap.aai.aai-common</groupId>
diff --git a/aai-traversal/src/main/docker/Dockerfile b/aai-traversal/src/main/docker/Dockerfile
index e17fa90..3bd8e4e 100644
--- a/aai-traversal/src/main/docker/Dockerfile
+++ b/aai-traversal/src/main/docker/Dockerfile
@@ -1,4 +1,4 @@
-FROM eclipse-temurin:8-jre-alpine
+FROM eclipse-temurin:11-jre-alpine
# curl is used in the putTool script
# (PUT's can't be done using the busybox wget)
RUN apk --no-cache add curl
diff --git a/aai-traversal/src/main/docker/docker-entrypoint.sh b/aai-traversal/src/main/docker/docker-entrypoint.sh
index be29460..9325ec6 100644
--- a/aai-traversal/src/main/docker/docker-entrypoint.sh
+++ b/aai-traversal/src/main/docker/docker-entrypoint.sh
@@ -40,30 +40,22 @@ MAX_METASPACE_SIZE=${MAX_METASPACE_SIZE:-512m};
JAVA_CMD="exec java";
-JVM_OPTS="${PRE_JVM_ARGS} -Xloggc:/opt/app/aai-traversal/logs/gc/aai_gc.log";
+JVM_OPTS="${PRE_JVM_ARGS}";
JVM_OPTS="${JVM_OPTS} -XX:HeapDumpPath=/opt/app/aai-traversal/logs/ajsc-jetty/heap-dump";
-JVM_OPTS="${JVM_OPTS} -Xms${MIN_HEAP_SIZE}";
-JVM_OPTS="${JVM_OPTS} -Xmx${MAX_HEAP_SIZE}";
-
-JVM_OPTS="${JVM_OPTS} -XX:+PrintGCDetails";
-JVM_OPTS="${JVM_OPTS} -XX:+PrintGCTimeStamps";
JVM_OPTS="${JVM_OPTS} -XX:MaxMetaspaceSize=${MAX_METASPACE_SIZE}";
+JVM_OPTS="${JVM_OPTS} -XX:MaxRAMPercentage=${MAX_RAM_PERCENTAGE:-60}";
JVM_OPTS="${JVM_OPTS} -server";
JVM_OPTS="${JVM_OPTS} -XX:NewSize=512m";
JVM_OPTS="${JVM_OPTS} -XX:MaxNewSize=512m";
JVM_OPTS="${JVM_OPTS} -XX:SurvivorRatio=8";
JVM_OPTS="${JVM_OPTS} -XX:+DisableExplicitGC";
-JVM_OPTS="${JVM_OPTS} -verbose:gc";
-JVM_OPTS="${JVM_OPTS} -XX:+UseParNewGC";
+JVM_OPTS="${JVM_OPTS} -XX:+UseG1GC";
JVM_OPTS="${JVM_OPTS} -XX:+CMSParallelRemarkEnabled";
JVM_OPTS="${JVM_OPTS} -XX:+CMSClassUnloadingEnabled";
-JVM_OPTS="${JVM_OPTS} -XX:+UseConcMarkSweepGC";
JVM_OPTS="${JVM_OPTS} -XX:-UseBiasedLocking";
JVM_OPTS="${JVM_OPTS} -XX:ParallelGCThreads=4";
JVM_OPTS="${JVM_OPTS} -XX:LargePageSizeInBytes=128m";
-JVM_OPTS="${JVM_OPTS} -XX:+PrintGCDetails";
-JVM_OPTS="${JVM_OPTS} -XX:+PrintGCTimeStamps";
JVM_OPTS="${JVM_OPTS} -Dsun.net.inetaddr.ttl=180";
JVM_OPTS="${JVM_OPTS} -XX:+HeapDumpOnOutOfMemoryError";
JVM_OPTS="${JVM_OPTS} ${POST_JVM_ARGS}";
diff --git a/onap-java-formatter.xml b/onap-java-formatter.xml
index 920d37b..29dbb9a 100644
--- a/onap-java-formatter.xml
+++ b/onap-java-formatter.xml
@@ -2,11 +2,11 @@
<profiles version="12">
<profile kind="CodeFormatterProfile" name="onap-java-formatter" version="12">
<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
-<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/>
-<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.8"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="11"/>
+<setting id="org.eclipse.jdt.core.compiler.compliance" value="11"/>
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
-<setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/>
+<setting id="org.eclipse.jdt.core.compiler.source" value="11"/>
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="48"/>
diff --git a/pom.xml b/pom.xml
index ce85ecc..0af26d2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.onap.aai.aai-common</groupId>
<artifactId>aai-parent</artifactId>
- <version>1.14.6</version>
+ <version>1.14.7</version>
</parent>
<groupId>org.onap.aai.traversal</groupId>
<artifactId>traversal</artifactId>
@@ -41,7 +41,7 @@
Nexus Proxy Properties and Snapshot Locations
Ideally this can be overwritten at runtime per internal environment specific values at runtime
-->
- <aai.common.version>1.14.6</aai.common.version>
+ <aai.common.version>1.14.7</aai.common.version>
<nexusproxy>https://nexus.onap.org</nexusproxy>
<site.path>/content/sites/site/org/onap/aai/traversal/${project.artifactId}/${project.version}</site.path>
<release.path>/content/repositories/releases/</release.path>