You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ab...@apache.org on 2020/10/12 12:42:06 UTC

[hive] branch master updated: HIVE-23938: LLAP: JDK11 - some GC log file rotation related jvm arguments cannot be used anymore (#1430) (Laszlo Bodor reviewed by Ashutosh Chauhan)

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

abstractdog pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new f34ea5f  HIVE-23938: LLAP: JDK11 - some GC log file rotation related jvm arguments cannot be used anymore (#1430) (Laszlo Bodor reviewed by Ashutosh Chauhan)
f34ea5f is described below

commit f34ea5f9302b4195d0bc98517a6de41bc6b80f6c
Author: Bodor Laszlo <bo...@gmail.com>
AuthorDate: Mon Oct 12 14:41:52 2020 +0200

    HIVE-23938: LLAP: JDK11 - some GC log file rotation related jvm arguments cannot be used anymore (#1430) (Laszlo Bodor reviewed by Ashutosh Chauhan)
---
 llap-server/bin/runLlapDaemon.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/llap-server/bin/runLlapDaemon.sh b/llap-server/bin/runLlapDaemon.sh
index 69642f4..1fe350b 100755
--- a/llap-server/bin/runLlapDaemon.sh
+++ b/llap-server/bin/runLlapDaemon.sh
@@ -52,7 +52,12 @@ shift
 JAVA=$JAVA_HOME/bin/java
 LOG_LEVEL_DEFAULT="INFO"
 LOGGER_DEFAULT="console"
-JAVA_OPTS_BASE="-server -Djava.net.preferIPv4Stack=true -XX:+UseNUMA -XX:+PrintGCDetails -verbose:gc -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=4 -XX:GCLogFileSize=100M -XX:+PrintGCDateStamps"
+JAVA_VERSION=$($JAVA -version 2>&1 | grep -i version | cut -d'"' -f2 | cut -d'.' -f1) # returns "1", "9", "11" for jdk 8,9,11 respectively
+JAVA_GC_OPTS="-XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=4 -XX:GCLogFileSize=100M -XX:+PrintGCDateStamps"
+if [ "$JAVA_VERSION" -gt "1" ]; then # from java9+, -Xlog argument should be used
+  JAVA_GC_OPTS="-Xlog:gc*,safepoint:gc.log:time,uptime:filecount=4,filesize=100M"
+fi
+JAVA_OPTS_BASE="-server -Djava.net.preferIPv4Stack=true -XX:+UseNUMA -verbose:gc $JAVA_GC_OPTS"
 
 if [ ! -d "${LLAP_DAEMON_HOME}" ]; then
   echo No LLAP_DAEMON_HOME set, or is not a directory.