cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua McKenzie (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8890) Enhance to handle Java version output in case of OpenJDK icedtea"
Date Wed, 24 Feb 2016 15:28:18 GMT


Joshua McKenzie commented on CASSANDRA-8890:

[~mshuler] - are you going to be able to get to this or should we dig up another reviewer?


> Enhance to handle Java version output in case of OpenJDK icedtea"
> ----------------------------------------------------------------------------------
>                 Key: CASSANDRA-8890
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Configuration
>         Environment: Red Hat Enterprise Linux Server release 6.4 (Santiago)
>            Reporter: Sumod Pawgi
>            Assignee: Brandon Williams
>            Priority: Minor
>              Labels: conf, icedtea
>             Fix For: 3.x
>         Attachments: 8890-v2.txt, trunk-8890.patch, trunk-8890.txt
> Where observed - 
> Cassandra node has OpenJDK - 
> java version "1.7.0_09-icedtea"
> In some situations, external agents trying to monitor a C* cluster would need to run
cassandra -v command to determine the Cassandra version and would expect a numerical output
e.g. java version "1.7.0_75" as in case of Oracle JDK. But if the cluster has OpenJDK IcedTea
installed, then this condition is not satisfied and the agents will not work correctly as
the output from "cassandra -v" is 
> /opt/apache/cassandra/bin/../conf/ line 102: [: 09-icedtea: integer
expression expected
> Cause - 
> The line which is causing this behavior is -
> jvmver=`echo "$java_ver_output" | grep '[openjdk|java] version' | awk -F'"' 'NR==1 {print
> Suggested enhancement -
> If we change the line to -
>  jvmver=`echo "$java_ver_output" | grep '[openjdk|java] version' | awk -F'"' 'NR==1 {print
$2}' | awk 'BEGIN {FS="-"};{print $1}'`,
> it will give $jvmver as - 1.7.0_09 for the above case. 
> Can we add this enhancement in the I would like to add it myself and
submit for review, but I am not familiar with C* check in process. There might be better ways
to do this, but I thought of this to be simplest and as the edition is at the end of the line,
it will be easy to reverse if needed.

This message was sent by Atlassian JIRA

View raw message