From f87c807979532bcf1971fe206cbeac35707389e7 Mon Sep 17 00:00:00 2001 From: caiconghui <55968745+caiconghui@users.noreply.github.com> Date: Wed, 15 Nov 2023 10:27:30 +0800 Subject: [PATCH] [enhancement](jdk) support doris fe running in jvm with jdk16+ (#26889) --- bin/start_fe.sh | 8 +++++++- conf/fe.conf | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/start_fe.sh b/bin/start_fe.sh index 56f78af697a991..f52e47c93ed90f 100755 --- a/bin/start_fe.sh +++ b/bin/start_fe.sh @@ -181,7 +181,13 @@ java_version="$( jdk_version "${JAVA}" )" final_java_opt="${JAVA_OPTS}" -if [[ "${java_version}" -gt 8 ]]; then +if [[ "${java_version}" -ge 16 ]]; then + if [[ -z "${JAVA_OPTS_FOR_JDK_16}" ]]; then + echo "JAVA_OPTS_FOR_JDK_16 is not set in fe.conf" >>"${LOG_DIR}/fe.out" + exit 1 + fi + final_java_opt="${JAVA_OPTS_FOR_JDK_16}" +elif [[ "${java_version}" -gt 8 ]]; then if [[ -z "${JAVA_OPTS_FOR_JDK_9}" ]]; then echo "JAVA_OPTS_FOR_JDK_9 is not set in fe.conf" >>"${LOG_DIR}/fe.out" exit 1 diff --git a/conf/fe.conf b/conf/fe.conf index fd145e743efe58..c4d162d118d43e 100644 --- a/conf/fe.conf +++ b/conf/fe.conf @@ -31,6 +31,10 @@ JAVA_OPTS="-Dsun.security.krb5.debug=true -Djavax.security.auth.useSubjectCredsO # For jdk 9+, this JAVA_OPTS will be used as default JVM options JAVA_OPTS_FOR_JDK_9="-Dsun.security.krb5.debug=true -Djavax.security.auth.useSubjectCredsOnly=false -Xss4m -Xmx8192m -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=7 -XX:+CMSClassUnloadingEnabled -XX:-CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=80 -XX:SoftRefLRUPolicyMSPerMB=0 -Xlog:gc*:$DORIS_HOME/log/fe.gc.log.$CUR_DATE:time" +# For jdk 16+, this JAVA_OPTS will be used as default JVM options +JAVA_OPTS_FOR_JDK_16="-Djavax.security.auth.useSubjectCredsOnly=false -XX:+UseZGC -Xmx8192m -Xms8192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$DORIS_HOME/log/ -Xlog:gc*:$DORIS_HOME/log/fe.gc.log.$CUR_DATE:time --add-opens java.base/java.util.concurrent.locks=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.ref=ALL-UNNAMED --add-opens java.base/java.util.regex=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED" + + ## ## the lowercase properties are read by main program. ##