This is an automated email from the ASF dual-hosted git repository. rickyma pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push: new eee747b6a [Improvement][dashboard] Modify startup scripts that support JDK9 or later. (#1880) eee747b6a is described below commit eee747b6a6fcd43a358c8e7653c29c132c9fed41 Author: yl09099 <33595968+yl09...@users.noreply.github.com> AuthorDate: Wed Jul 10 10:57:08 2024 +0800 [Improvement][dashboard] Modify startup scripts that support JDK9 or later. (#1880) ### What changes were proposed in this pull request? The script startup parameters are outdated when the dashboard is booted with an advanced JDK version. The issues are as follows: [0.001s][warning][gc] -XX:+PrintGC is deprecated. Will use -Xlog:gc instead. [0.001s][warning][gc] -XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead. -XX:ConcGCThreads=5 -XX:G1ConcRefinementThreads=20 -XX:GCDrainStackTargetSize=64 -XX:+IgnoreUnrecognizedVMOptions -XX:InitialHeapSize=42949672960 -XX:InitiatingHeapOccupancyPercent=45 -XX:MaxGCPauseMillis=200 -XX:MaxHeapSize=42949672960 -XX:ParallelGCThreads=20 -XX:+PrintCommandLineFlags -XX:+PrintGC -XX:+PrintGCDetails -XX:ReservedCodeCacheSize=251658240 -XX:+SegmentedCodeCache -XX:+UseG1GC ### Why are the changes needed? Fix: #1401 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing UT. --- bin/start-dashboard.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/bin/start-dashboard.sh b/bin/start-dashboard.sh index f21c6790f..e001b951d 100644 --- a/bin/start-dashboard.sh +++ b/bin/start-dashboard.sh @@ -55,20 +55,22 @@ JVM_ARGS=" -server \ -XX:ParallelGCThreads=20 \ -XX:ConcGCThreads=5 \ -XX:InitiatingHeapOccupancyPercent=45 \ - -XX:+PrintGC \ + -XX:+PrintCommandLineFlags" + +GC_LOG_ARGS_LEGACY=" -XX:+PrintGC \ -XX:+PrintAdaptiveSizePolicy \ -XX:+PrintGCDateStamps \ -XX:+PrintGCTimeStamps \ -XX:+PrintTenuringDistribution \ -XX:+PrintPromotionFailure \ -XX:+PrintGCApplicationStoppedTime \ - -XX:+PrintCommandLineFlags \ -XX:+PrintGCCause \ -XX:+PrintGCDetails \ -Xloggc:${RSS_LOG_DIR}/gc-%t.log" -JAVA11_EXTRA_ARGS=" -XX:+IgnoreUnrecognizedVMOptions \ - -Xlog:gc:tags,time,uptime,level" +GC_LOG_ARGS_NEW=" -XX:+IgnoreUnrecognizedVMOptions \ + -Xlog:gc*:file=${RSS_LOG_DIR}/dashboard-gc-%t.log:tags,uptime,time,level:filecount=5,filesize=102400" + ARGS="" @@ -79,7 +81,14 @@ else exit 1 fi -$RUNNER $ARGS $JVM_ARGS $JAVA11_EXTRA_ARGS -cp $CLASSPATH $MAIN_CLASS --conf "$DASHBOARD_CONF_FILE" $@ & +version=$($RUNNER -version 2>&1 | awk -F[\".] '/version/ {print $2}') +if [[ "$version" -lt "9" ]]; then + GC_ARGS=$GC_LOG_ARGS_LEGACY +else + GC_ARGS=$GC_LOG_ARGS_NEW +fi + +$RUNNER $ARGS $JVM_ARGS $GC_ARGS -cp $CLASSPATH $MAIN_CLASS --conf "$DASHBOARD_CONF_FILE" $@ & get_pid_file_name dashboard echo $! >${RSS_PID_DIR}/${pid_file}