cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snazy <...@git.apache.org>
Subject [GitHub] cassandra pull request #236: 9608 trunk
Date Mon, 02 Jul 2018 09:45:53 GMT
Github user snazy commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/236#discussion_r199440809
  
    --- Diff: conf/cassandra-env.sh ---
    @@ -86,50 +86,36 @@ calculate_heap_sizes()
         fi
     }
     
    -# Determine the sort of JVM we'll be running on.
    -java_ver_output=`"${JAVA:-java}" -version 2>&1`
    -jvmver=`echo "$java_ver_output" | grep '[openjdk|java] version' | awk -F'"' 'NR==1 {print
$2}' | cut -d\- -f1`
    -JVM_VERSION=${jvmver%_*}
    -JVM_PATCH_VERSION=${jvmver#*_}
    -
    -if [ "$JVM_VERSION" \< "1.8" ] ; then
    -    echo "Cassandra 3.0 and later require Java 8u40 or later."
    -    exit 1;
    -fi
    -
    -if [ "$JVM_VERSION" \< "1.8" ] && [ "$JVM_PATCH_VERSION" -lt 40 ] ; then
    -    echo "Cassandra 3.0 and later require Java 8u40 or later."
    -    exit 1;
    -fi
    -
    -jvm=`echo "$java_ver_output" | grep -A 1 '[openjdk|java] version' | awk 'NR==2 {print
$1}'`
    -case "$jvm" in
    -    OpenJDK)
    -        JVM_VENDOR=OpenJDK
    -        # this will be "64-Bit" or "32-Bit"
    -        JVM_ARCH=`echo "$java_ver_output" | awk 'NR==3 {print $2}'`
    -        ;;
    -    "Java(TM)")
    -        JVM_VENDOR=Oracle
    -        # this will be "64-Bit" or "32-Bit"
    -        JVM_ARCH=`echo "$java_ver_output" | awk 'NR==3 {print $3}'`
    -        ;;
    -    *)
    -        # Help fill in other JVM values
    -        JVM_VENDOR=other
    -        JVM_ARCH=unknown
    -        ;;
    -esac
    -
     #GC log path has to be defined here because it needs to access CASSANDRA_HOME
    -JVM_OPTS="$JVM_OPTS -Xloggc:${CASSANDRA_HOME}/logs/gc.log"
    +if [ $JAVA_VERSION -ge 11 ] ; then
    +    # See description of https://bugs.openjdk.java.net/browse/JDK-8046148 for details
about the syntax
    +    # The following is the equivalent to -XX:+PrintGCDetails -XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M
    +    if ! grep -q "^-[X]log:gc" $CASSANDRA_CONF/jvm.options ; then # [X] to prevent ccm
from replacing this line
    +        # only add -Xlog:gc if it's not mentioned in jvm.options file
    +        mkdir -p ${CASSANDRA_HOME}/logs
    +        JVM_OPTS="$JVM_OPTS -Xlog:gc=info,heap*=trace,age*=debug,safepoint=info,promotion*=trace:file=${CASSANDRA_HOME}/logs/gc.log:time,uptime,pid,tid,level:filecount=10,filesize=10240"
    --- End diff --
    
    nice catch!


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Mime
View raw message