imbajin commented on code in PR #2477:
URL:
https://github.com/apache/incubator-hugegraph/pull/2477#discussion_r1524630739
##########
hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh:
##########
@@ -130,29 +128,66 @@ fi
# mention: zgc is only available on ARM-Mac with java > 13
case "$GC_OPTION" in
g1|G1|g1gc)
- echo "Using G1GC as the default garbage collector"
- JAVA_OPTIONS="${JAVA_OPTIONS} -XX:+UseG1GC -XX:+ParallelRefProcEnabled
\
+ echo "Using G1GC as the default garbage collector"
+ JAVA_OPTIONS="${JAVA_OPTIONS} -XX:+UseG1GC -XX:+ParallelRefProcEnabled \
-XX:InitiatingHeapOccupancyPercent=50 \
-XX:G1RSetUpdatingPauseTimePercent=5"
- ;;
+ ;;
zgc|ZGC)
- echo "Using ZGC as the default garbage collector (Only support Java
11+)"
- JAVA_OPTIONS="${JAVA_OPTIONS} -XX:+UseZGC
-XX:+UnlockExperimentalVMOptions \
+ echo "Using ZGC as the default garbage collector (Only support Java 11+)"
+ JAVA_OPTIONS="${JAVA_OPTIONS} -XX:+UseZGC -XX:+UnlockExperimentalVMOptions
\
-XX:ConcGCThreads=2
-XX:ParallelGCThreads=6 \
-XX:ZCollectionInterval=120
-XX:ZAllocationSpikeTolerance=5 \
-XX:+UnlockDiagnosticVMOptions
-XX:-ZProactive"
- ;;
- "") ;;
- *)
+ ;;
+"") ;;
+*)
echo "Unrecognized gc option: '$GC_OPTION', only support 'G1/ZGC' now"
>> ${OUTPUT}
- exit 1
+ exit 1
esac
JVM_OPTIONS="-Dlog4j.configurationFile=${CONF}/log4j2.xml"
if [[ ${OPEN_SECURITY_CHECK} == "true" ]]; then
JVM_OPTIONS="${JVM_OPTIONS}
-Djava.security.manager=org.apache.hugegraph.security.HugeSecurityManager"
fi
+if [ "${OPEN_TELEMETRY}" == "true" ]; then
+ OT_JAR="opentelemetry-javaagent.jar"
+ OT_JAR_PATH="${PLUGINS}/${OT_JAR}"
+
+ if [[ ! -e "${OT_JAR_PATH}" ]]; then
+ echo "## Downloading ${OT_JAR}..."
+ download "${PLUGINS}" \
+
"${GITHUB}/open-telemetry/opentelemetry-java-instrumentation/releases/download/v2.1.0/${OT_JAR}"
+
+ if [[ ! -e "${OT_JAR_PATH}" ]]; then
+ echo "## Error: Failed to download ${OT_JAR}." >>${OUTPUT}
+ exit 1
+ fi
+ fi
+
+ expected_md5="e3bcbbe8ed9b6d840fa4c333b36f369f"
Review Comment:
```suggestion
# Note: remember update it if we change the jar
expected_md5="e3bcbbe8ed9b6d840fa4c333b36f369f"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]