You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2015/03/13 11:35:31 UTC

ambari git commit: AMBARI-10038 Add support for Oracle JDK 1.8 (default) (dsen)

Repository: ambari
Updated Branches:
  refs/heads/trunk e88914da6 -> 49e894f4b


AMBARI-10038 Add support for Oracle JDK 1.8 (default) (dsen)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/49e894f4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/49e894f4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/49e894f4

Branch: refs/heads/trunk
Commit: 49e894f4be5244e50b33388ed1b8ba88eecc61c8
Parents: e88914d
Author: Dmytro Sen <ds...@apache.org>
Authored: Fri Mar 13 11:25:39 2015 +0200
Committer: Dmytro Sen <ds...@apache.org>
Committed: Fri Mar 13 12:31:56 2015 +0200

----------------------------------------------------------------------
 ambari-server/conf/unix/ambari.properties                   | 9 ++++++++-
 .../src/main/python/ambari_server/serverConfiguration.py    | 8 ++++----
 ambari-server/src/test/python/TestAmbariServer.py           | 2 ++
 3 files changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/49e894f4/ambari-server/conf/unix/ambari.properties
----------------------------------------------------------------------
diff --git a/ambari-server/conf/unix/ambari.properties b/ambari-server/conf/unix/ambari.properties
index 251f068..25a4081 100644
--- a/ambari-server/conf/unix/ambari.properties
+++ b/ambari-server/conf/unix/ambari.properties
@@ -23,7 +23,7 @@ resources.dir = /var/lib/ambari-server/resources
 shared.resources.dir = /usr/lib/ambari-server/lib/ambari_commons/resources
 custom.action.definitions = /var/lib/ambari-server/resources/custom_action_definitions
 
-java.releases=jdk1.7,jdk1.6
+java.releases=jdk1.8,jdk1.7,jdk1.6
 jdk1.6.desc=Oracle JDK 1.6
 jdk1.6.url=http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-6u31-linux-x64.bin
 jdk1.6.dest-file=jdk-6u31-linux-x64.bin
@@ -38,6 +38,13 @@ jdk1.7.jcpol-url=http://public-repo-1.hortonworks.com/ARTIFACTS/UnlimitedJCEPoli
 jdk1.7.jcpol-file=UnlimitedJCEPolicyJDK7.zip
 jdk1.7.home=/usr/jdk64/
 jdk1.7.re=(jdk.*)/jre
+jdk1.8.desc=Oracle JDK 1.8
+jdk1.8.url=http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u40-linux-x64.tar.gz
+jdk1.8.dest-file=jdk-8u40-linux-x64.tar.gz
+jdk1.8.jcpol-url=http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip
+jdk1.8.jcpol-file=jce_policy-8.zip
+jdk1.8.home=/usr/jdk64/
+jdk1.8.re=(jdk.*)/jre
 
 metadata.path=/var/lib/ambari-server/resources/stacks
 common.services.path=/var/lib/ambari-server/resources/common-services

http://git-wip-us.apache.org/repos/asf/ambari/blob/49e894f4/ambari-server/src/main/python/ambari_server/serverConfiguration.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/serverConfiguration.py b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
index 35d14f5..b8f6641 100644
--- a/ambari-server/src/main/python/ambari_server/serverConfiguration.py
+++ b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
@@ -81,10 +81,10 @@ JDK_NAME_PROPERTY = "jdk.name"
 JCE_NAME_PROPERTY = "jce.name"
 
 DEFAULT_JDK16_LOCATION = "/usr/jdk64/jdk1.6.0_31"
-JDK_NAMES = ["jdk-7u67-linux-x64.tar.gz", "jdk-6u31-linux-x64.bin"]
+JDK_NAMES = ["jdk-8u40-linux-x64.tar.gz", "jdk-7u67-linux-x64.tar.gz", "jdk-6u31-linux-x64.bin"]
 
 #JCE Policy files
-JCE_POLICY_FILENAMES = ["UnlimitedJCEPolicyJDK7.zip", "jce_policy-6.zip"]
+JCE_POLICY_FILENAMES = ["jce_policy-8.zip", "UnlimitedJCEPolicyJDK7.zip", "jce_policy-6.zip"]
 
 # JDBC
 JDBC_PATTERNS = {"oracle": "*ojdbc*.jar", "mysql": "*mysql*.jar"}
@@ -812,10 +812,10 @@ def update_ambari_properties():
 
     isJDK16Installed = new_properties.get_property(JAVA_HOME_PROPERTY) == DEFAULT_JDK16_LOCATION
     if not JDK_NAME_PROPERTY in new_properties.keys() and isJDK16Installed:
-      new_properties.process_pair(JDK_NAME_PROPERTY, JDK_NAMES[1])
+      new_properties.process_pair(JDK_NAME_PROPERTY, JDK_NAMES[2])
 
     if not JCE_NAME_PROPERTY in new_properties.keys() and isJDK16Installed:
-      new_properties.process_pair(JCE_NAME_PROPERTY, JCE_POLICY_FILENAMES[1])
+      new_properties.process_pair(JCE_NAME_PROPERTY, JCE_POLICY_FILENAMES[2])
 
     if not OS_FAMILY_PROPERTY in new_properties.keys():
       new_properties.process_pair(OS_FAMILY_PROPERTY, OS_FAMILY + OS_VERSION)

http://git-wip-us.apache.org/repos/asf/ambari/blob/49e894f4/ambari-server/src/test/python/TestAmbariServer.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/TestAmbariServer.py b/ambari-server/src/test/python/TestAmbariServer.py
index 83c27a6..df8cf2b 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -4573,10 +4573,12 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
     with open(serverConfiguration.AMBARI_PROPERTIES_FILE, "w") as f:
       f.write(NEW_PROPERTY)
       f.write(CHANGED_VALUE_PROPERTY)
+      f.close()
 
     with open(configDefaults.AMBARI_PROPERTIES_BACKUP_FILE, 'w') as f:
       for line in properties:
         f.write(line)
+      f.close()
 
     #Call tested method
     update_ambari_properties()