cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-8890) Enhance cassandra-env.sh to handle Java version output in case of OpenJDK icedtea"
Date Tue, 08 Mar 2016 09:31:40 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-8890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sylvain Lebresne updated CASSANDRA-8890:
----------------------------------------
       Resolution: Fixed
    Fix Version/s:     (was: 3.x)
                   3.5
    Reproduced In: 2.2.0 beta 1, 2.1.2  (was: 2.1.2, 2.2.0 beta 1)
           Status: Resolved  (was: Ready to Commit)

> Enhance cassandra-env.sh to handle Java version output in case of OpenJDK icedtea"
> ----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-8890
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8890
>             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.5
>
>         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/cassandra-env.sh: 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
$2}'`
> 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 cassandra-env.sh? 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
(v6.3.4#6332)

Mime
View raw message