diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/main/docker/Dockerfile | 2 | ||||
-rw-r--r-- | src/main/docker/docker-entrypoint.sh | 15 | ||||
-rw-r--r-- | src/main/java/org/onap/aai/db/schema/AuditDoc.java | 30 | ||||
-rw-r--r-- | src/main/java/org/onap/aai/db/schema/EdgeProperty.java | 29 | ||||
-rw-r--r-- | src/main/java/org/onap/aai/db/schema/ScriptDriver.java | 1 | ||||
-rw-r--r-- | src/main/java/org/onap/aai/web/JerseyConfiguration.java | 4 | ||||
-rw-r--r-- | src/test/java/org/onap/aai/schema/db/ManageSchemaTest.java | 2 |
7 files changed, 35 insertions, 48 deletions
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile index 88faf79..6fb1cd3 100755 --- a/src/main/docker/Dockerfile +++ b/src/main/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:8-jre-alpine +FROM eclipse-temurin:11-jre-alpine USER root ENV SERVER_PORT=8449 EXPOSE ${SERVER_PORT} diff --git a/src/main/docker/docker-entrypoint.sh b/src/main/docker/docker-entrypoint.sh index 9232398..d80eea5 100644 --- a/src/main/docker/docker-entrypoint.sh +++ b/src/main/docker/docker-entrypoint.sh @@ -45,19 +45,12 @@ if [ -f ${APP_HOME}/resources/aai-graphadmin-swm-vars.sh ]; then source ${APP_HOME}/resources/aai-graphadmin-swm-vars.sh; fi; -MIN_HEAP_SIZE=${MIN_HEAP_SIZE:-512m}; -MAX_HEAP_SIZE=${MAX_HEAP_SIZE:-1024m}; MAX_METASPACE_SIZE=${MAX_METASPACE_SIZE:-512m}; JAVA_CMD="exec java"; -JVM_OPTS="${PRE_JVM_ARGS} -Xloggc:/opt/app/aai-graphadmin/logs/gc/aai_gc.log"; JVM_OPTS="${JVM_OPTS} -XX:HeapDumpPath=/opt/app/aai-graphadmin/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:MaxRAMPercentage=${MAX_RAM_PERCENTAGE:-60}"; JVM_OPTS="${JVM_OPTS} -XX:MaxMetaspaceSize=${MAX_METASPACE_SIZE}"; JVM_OPTS="${JVM_OPTS} -server"; @@ -65,16 +58,12 @@ 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/src/main/java/org/onap/aai/db/schema/AuditDoc.java b/src/main/java/org/onap/aai/db/schema/AuditDoc.java index 2beec12..0d828ca 100644 --- a/src/main/java/org/onap/aai/db/schema/AuditDoc.java +++ b/src/main/java/org/onap/aai/db/schema/AuditDoc.java @@ -19,16 +19,16 @@ */ package org.onap.aai.db.schema; -import org.codehaus.jackson.annotate.JsonProperty; - import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + public class AuditDoc { private List<DBProperty> properties; private List<DBIndex> indexes; private List<EdgeProperty> edgeLabels; - + /** * Gets the properties. * @@ -37,7 +37,7 @@ public class AuditDoc { public List<DBProperty> getProperties() { return properties; } - + /** * Sets the properties. * @@ -46,7 +46,7 @@ public class AuditDoc { public void setProperties(List<DBProperty> properties) { this.properties = properties; } - + /** * Gets the indexes. * @@ -55,7 +55,7 @@ public class AuditDoc { public List<DBIndex> getIndexes() { return indexes; } - + /** * Sets the indexes. * @@ -64,17 +64,17 @@ public class AuditDoc { public void setIndexes(List<DBIndex> indexes) { this.indexes = indexes; } - - /** - * Gets the edge labels. - * - * @return the edge labels - */ - @JsonProperty("edge-labels") + + /** + * Gets the edge labels. + * + * @return the edge labels + */ + @JsonProperty("edge-labels") public List<EdgeProperty> getEdgeLabels() { return edgeLabels; } - + /** * Sets the edge labels. * @@ -83,6 +83,4 @@ public class AuditDoc { public void setEdgeLabels(List<EdgeProperty> edgeLabels) { this.edgeLabels = edgeLabels; } - - } diff --git a/src/main/java/org/onap/aai/db/schema/EdgeProperty.java b/src/main/java/org/onap/aai/db/schema/EdgeProperty.java index f89bc8f..7b1dd4b 100644 --- a/src/main/java/org/onap/aai/db/schema/EdgeProperty.java +++ b/src/main/java/org/onap/aai/db/schema/EdgeProperty.java @@ -19,34 +19,35 @@ */ package org.onap.aai.db.schema; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.annotate.JsonPropertyOrder; import org.janusgraph.core.Multiplicity; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + @JsonPropertyOrder({ "label", "multiplicity" }) public class EdgeProperty implements Named { private String name = null; private Multiplicity multiplicity = null; - + /** * Gets the name */ - @JsonProperty("label") + @JsonProperty("label") public String getName() { return name; } - - /** - * Sets the name. - * - * @param name the new name - */ - @JsonProperty("label") + + /** + * Sets the name. + * + * @param name the new name + */ + @JsonProperty("label") public void setName(String name) { this.name = name; } - + /** * Gets the multiplicity. * @@ -55,7 +56,7 @@ public class EdgeProperty implements Named { public Multiplicity getMultiplicity() { return multiplicity; } - + /** * Sets the multiplicity. * @@ -64,5 +65,5 @@ public class EdgeProperty implements Named { public void setMultiplicity(Multiplicity multiplicity) { this.multiplicity = multiplicity; } - + } diff --git a/src/main/java/org/onap/aai/db/schema/ScriptDriver.java b/src/main/java/org/onap/aai/db/schema/ScriptDriver.java index 88c9bf9..073ca59 100644 --- a/src/main/java/org/onap/aai/db/schema/ScriptDriver.java +++ b/src/main/java/org/onap/aai/db/schema/ScriptDriver.java @@ -23,7 +23,6 @@ import com.beust.jcommander.JCommander; import com.beust.jcommander.Parameter; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.configuration2.PropertiesConfiguration; -import org.codehaus.jackson.JsonGenerationException; import org.janusgraph.core.JanusGraph; import org.janusgraph.core.JanusGraphFactory; import org.onap.aai.restclient.PropertyPasswordConfiguration; diff --git a/src/main/java/org/onap/aai/web/JerseyConfiguration.java b/src/main/java/org/onap/aai/web/JerseyConfiguration.java index 7da90c0..99f304d 100644 --- a/src/main/java/org/onap/aai/web/JerseyConfiguration.java +++ b/src/main/java/org/onap/aai/web/JerseyConfiguration.java @@ -19,7 +19,6 @@ */ package org.onap.aai.web; -import com.sun.jersey.api.client.filter.LoggingFilter; import java.util.List; import java.util.Set; import java.util.logging.Logger; @@ -27,6 +26,7 @@ import java.util.stream.Collectors; import javax.annotation.Priority; import javax.ws.rs.container.ContainerRequestFilter; import javax.ws.rs.container.ContainerResponseFilter; +import org.glassfish.jersey.logging.LoggingFeature; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.servlet.ServletProperties; import org.onap.aai.rest.AuditSqlDbConsumer; @@ -65,7 +65,7 @@ public class JerseyConfiguration extends ResourceConfig { // Following registers the request headers and response headers // If the LoggingFilter second argument is set to true, it will print response value as well if ("true".equalsIgnoreCase(env.getProperty("aai.request.logging.enabled"))) { - register(new LoggingFilter(log, 0)); + register(new LoggingFeature(log)); } } diff --git a/src/test/java/org/onap/aai/schema/db/ManageSchemaTest.java b/src/test/java/org/onap/aai/schema/db/ManageSchemaTest.java index 23c3352..b7bb9c4 100644 --- a/src/test/java/org/onap/aai/schema/db/ManageSchemaTest.java +++ b/src/test/java/org/onap/aai/schema/db/ManageSchemaTest.java @@ -19,7 +19,6 @@ */ package org.onap.aai.schema.db; -import org.codehaus.jackson.JsonParseException; import org.janusgraph.core.JanusGraph; import org.janusgraph.core.JanusGraphFactory; import org.janusgraph.core.schema.JanusGraphManagement; @@ -31,6 +30,7 @@ import org.onap.aai.AAISetup; import org.onap.aai.db.schema.DBIndex; import org.onap.aai.db.schema.ManageJanusGraphSchema; +import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; |