You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Shubhangi Nivas Pardeshi (JIRA)" <ji...@apache.org> on 2018/01/15 07:18:00 UTC

[jira] [Created] (AMBARI-22778) Need better java version check in amabri

Shubhangi Nivas Pardeshi created AMBARI-22778:
-------------------------------------------------

             Summary: Need better java version check in amabri
                 Key: AMBARI-22778
                 URL: https://issues.apache.org/jira/browse/AMBARI-22778
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
            Reporter: Shubhangi Nivas Pardeshi


Ambari sets value for following tez parameter based on java version.
{code:java}
tez.am.launch.cmd-opts
{code}
Java version is decided based on java home directory name i.e. java.home value in ambari.properties.

Following is scriptlet from script stack_advisor.py.
{code:java}
# TEZ JVM options
jvmGCParams = "-XX:+UseParallelGC"
if "ambari-server-properties" in services and "java.home" in services["ambari-server-properties"]:
# JDK8 needs different parameters
match = re.match(".*\/jdk(1\.\d+)[\-\_\.][^/]*$", services["ambari-server-properties"]["java.home"])
if match and len(match.groups()) > 0:
# Is version >= 1.8
versionSplits = re.split("\.", match.group(1))
if versionSplits and len(versionSplits) > 1 and int(versionSplits[0]) > 0 and int(versionSplits[1]) > 7:
jvmGCParams = "-XX:+UseG1GC -XX:+ResizeTLAB"
{code}
If java home directory name does not contain version but it is valid > 1.7 java then above test fails and set parallel gc incorrectly instead of G1GC.

In this Bug , I request to change version check method to use
{code:java}
"{java.home from ambari.properties}/bin/java -version"
{code}
command instead of relying on directory name.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)