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

Olivér Szabó updated AMBARI-21099:
----------------------------------
    Description: 
Requirements:
- ambari should drop JDK 7 support for ambari-server and ambari-managed 
services (infra, ams, logsearch)
- HDP 2.x should be still able to use JDK 1.7
Changes in ambari setup:
1. First the usual ambari setup
{code:java}
Choose JDK for Ambari and Stack services:
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2] Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
[3] Custom JDK
{code}
2. If JDK 7 is picked, that cannot be used for ambari (only for the stack 
services)
{code:java}
JDK 7 is detected (JDK 8 required for ambari-server), install JDK 8 as well:
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[3] Custom JDK
{code}

After the commands are executed, the following properties would appear in 
ambari.properties
{code:java}
stack.java.home=/usr/jdk64/jdk1.7.0_67
stack.jdk.name=jdk-7u67linux-x64.tar.gz
stack.jce.name=UnlimitedJCEPolicyJDK7.zip
{code}
or opposite of it:
{code:java}
ambari.java.home=/usr/jdk64/jdk1.8.0_112
ambari.jdk.name=jdk-8u112linux-x64.tar.gz
ambari.jce.name=UnlimitedJCEPolicyJDK8.zip
{code}

During command.json generating, hostParameters would be filled with the proper 
jdk,jce info (different for infra/logsearch/ams from other services)

Also that requires to add JDK version check at the start of the ambari-upgrade. 
(tell the user to call ambari-server setup first)





  was:
Some of the services requires at least Java 8 in the future (like. infra-solr 
in ambari 3.0 or hadoop-3.0 in hdp 3.0), other than that we should still 
support JDK 7 as well for ambari-server.

In order to achieve that, ambari will need to install a JDK 8 even if JDK 7 is 
selected during ambari-server setup (that is the minimum right now)

Changes in ambari setup:
from
{code:java}
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2] Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
[3] Custom JDK
{code}
to
{code:java}
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2] Oracle JDK 1.7 / 1.8 + Java Cryptography Extension (JCE) Policy Files 7 / 8
[3] Custom JDK
{code}
JDK 7 pick will install a JDK8/JCE-8 as well. It will generate 3 new properties 
in ambari.properties file:
{code:java}
java8.home=/usr/jdk64/jdk1.8.0_112
jdk8.name=jdk-8u112-linux-x64.tar.gz
jce8.name=UnlimitedJCEPolicyJDK8.zip
{code}

On service stack side, there will be a new tag in the metainfo.xml (in service 
info) called {{minJdk}}
{code:java}
...  
  <services>
    <service>
      <name>AMBARI_INFRA</name>
      <displayName>Ambari Infra</displayName>
      <comment>Core shared service used by Ambari managed components.</comment>
      <version>0.1.0</version>
      <minJdk>1.8</minJdk>
  ...
{code}

If minJdk is set to 1.8, the default {{java_home}},{{jdk_name}} and 
{{jce_name}} hostParams in command.jsons will be replaced with the new config 
entries from ambari.properties file, so specific services could use jdk 1.8, 
and ambari will be able to still use 1.7 (if that is the requirement). On 
ambari upgrade scenarios: these 3 properties should be added to 
ambari.properties if jdk 1.7 was used before. (same is true if custom jdk is 
used with 1.7)






> Support services to use different JDKs (7 & 8)
> ----------------------------------------------
>
>                 Key: AMBARI-21099
>                 URL: https://issues.apache.org/jira/browse/AMBARI-21099
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 3.0.0
>            Reporter: Olivér Szabó
>            Assignee: Olivér Szabó
>             Fix For: 3.0.0
>
>         Attachments: AMBARI-21099.patch
>
>
> Requirements:
> - ambari should drop JDK 7 support for ambari-server and ambari-managed 
> services (infra, ams, logsearch)
> - HDP 2.x should be still able to use JDK 1.7
> Changes in ambari setup:
> 1. First the usual ambari setup
> {code:java}
> Choose JDK for Ambari and Stack services:
> [1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
> [2] Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
> [3] Custom JDK
> {code}
> 2. If JDK 7 is picked, that cannot be used for ambari (only for the stack 
> services)
> {code:java}
> JDK 7 is detected (JDK 8 required for ambari-server), install JDK 8 as well:
> [1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
> [3] Custom JDK
> {code}
> After the commands are executed, the following properties would appear in 
> ambari.properties
> {code:java}
> stack.java.home=/usr/jdk64/jdk1.7.0_67
> stack.jdk.name=jdk-7u67linux-x64.tar.gz
> stack.jce.name=UnlimitedJCEPolicyJDK7.zip
> {code}
> or opposite of it:
> {code:java}
> ambari.java.home=/usr/jdk64/jdk1.8.0_112
> ambari.jdk.name=jdk-8u112linux-x64.tar.gz
> ambari.jce.name=UnlimitedJCEPolicyJDK8.zip
> {code}
> During command.json generating, hostParameters would be filled with the 
> proper jdk,jce info (different for infra/logsearch/ams from other services)
> Also that requires to add JDK version check at the start of the 
> ambari-upgrade. (tell the user to call ambari-server setup first)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to