This is an automated email from the ASF dual-hosted git repository.

roryqi 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 d8d111cb [BUG][MINOR] Fix scripts compatible with jdk8 & jdk11 (#798)
d8d111cb is described below

commit d8d111cbcbfbb17f5bc0514cdb04272aa70076d9
Author: summaryzb <[email protected]>
AuthorDate: Fri Apr 7 16:01:51 2023 +0800

    [BUG][MINOR] Fix scripts compatible with jdk8 & jdk11 (#798)
    
    ### What changes were proposed in this pull request?
    Ignore unrecognized jvm options and use some gc options in jdk11 to replace 
that of jdk8
    
    ### Why are the changes needed?
    When use jdk11, the startup scripts will fail
    
    ### Does this PR introduce _any_ user-facing change?
    No.
    
    ### How was this patch tested?
    Just use jdk11 & jdk8 to startup the scripts without any failure
---
 bin/start-coordinator.sh    | 5 ++++-
 bin/start-shuffle-server.sh | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/bin/start-coordinator.sh b/bin/start-coordinator.sh
index 84749a61..142f8d6a 100644
--- a/bin/start-coordinator.sh
+++ b/bin/start-coordinator.sh
@@ -68,6 +68,9 @@ JVM_ARGS=" -server \
           -XX:+PrintGCDetails \
           -Xloggc:${RSS_LOG_DIR}/gc-%t.log"
 
+JAVA11_EXTRA_ARGS=" -XX:+IgnoreUnrecognizedVMOptions \
+          -Xlog:gc:tags,time,uptime,level"
+
 ARGS=""
 
 if [ -f ${LOG_CONF_FILE} ]; then
@@ -77,7 +80,7 @@ else
   exit 1
 fi
 
-$RUNNER $ARGS $JVM_ARGS -cp $CLASSPATH $MAIN_CLASS --conf 
"$COORDINATOR_CONF_FILE" $@ &> $OUT_PATH &
+$RUNNER $ARGS $JVM_ARGS $JAVA11_EXTRA_ARGS -cp $CLASSPATH $MAIN_CLASS --conf 
"$COORDINATOR_CONF_FILE" $@ &> $OUT_PATH &
 
 get_pid_file_name coordinator
 echo $! >${RSS_PID_DIR}/${pid_file}
diff --git a/bin/start-shuffle-server.sh b/bin/start-shuffle-server.sh
index 49206012..2235523e 100644
--- a/bin/start-shuffle-server.sh
+++ b/bin/start-shuffle-server.sh
@@ -88,6 +88,9 @@ JVM_ARGS=" -server \
           -XX:+PrintGCDetails \
           -Xloggc:${RSS_LOG_DIR}/gc-%t.log"
 
+JAVA11_EXTRA_ARGS=" -XX:+IgnoreUnrecognizedVMOptions \
+          -Xlog:gc:tags,time,uptime,level"
+
 ARGS=""
 
 if [ -f ${LOG_CONF_FILE} ]; then
@@ -97,7 +100,7 @@ else
   exit 1
 fi
 
-$RUNNER $ARGS $JVM_ARGS $JAVA_LIB_PATH -cp $CLASSPATH $MAIN_CLASS --conf 
"$SHUFFLE_SERVER_CONF_FILE" $@ &> $OUT_PATH &
+$RUNNER $ARGS $JVM_ARGS $JAVA11_EXTRA_ARGS $JAVA_LIB_PATH -cp $CLASSPATH 
$MAIN_CLASS --conf "$SHUFFLE_SERVER_CONF_FILE" $@ &> $OUT_PATH &
 
 get_pid_file_name shuffle-server
 echo $! >${RSS_PID_DIR}/${pid_file}

Reply via email to