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

[2/2] ambari git commit: AMBARI-19467. Custom jdk built for PPC architecture - making it easier for PPC users to pick the right JDK. (aonishuk)

AMBARI-19467. Custom jdk built for PPC architecture  - making it easier for PPC users to pick the right JDK. (aonishuk)


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

Branch: refs/heads/branch-2.5
Commit: 8a7bac7e965e8673ac2e679220988c3894e5404f
Parents: e9f2395
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Wed Jan 11 18:03:22 2017 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Wed Jan 11 18:03:22 2017 +0200

----------------------------------------------------------------------
 ambari-server/conf/unix/ambari.properties                      | 2 ++
 .../src/main/python/ambari_server/serverConfiguration.py       | 5 ++++-
 ambari-server/src/main/python/ambari_server/serverSetup.py     | 1 +
 ambari-server/src/main/python/ambari_server/utils.py           | 6 ++++++
 4 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8a7bac7e/ambari-server/conf/unix/ambari.properties
----------------------------------------------------------------------
diff --git a/ambari-server/conf/unix/ambari.properties b/ambari-server/conf/unix/ambari.properties
index 4dcbe99..99fea741 100644
--- a/ambari-server/conf/unix/ambari.properties
+++ b/ambari-server/conf/unix/ambari.properties
@@ -24,6 +24,8 @@ shared.resources.dir = $ROOT/usr/lib/ambari-server/lib/ambari_commons/resources
 custom.action.definitions = $ROOT/var/lib/ambari-server/resources/custom_action_definitions
 
 java.releases=jdk1.8,jdk1.7
+java.releases.ppc64le=
+
 jdk1.7.desc=Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
 jdk1.7.url=http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u67-linux-x64.tar.gz
 jdk1.7.dest-file=jdk-7u67-linux-x64.tar.gz

http://git-wip-us.apache.org/repos/asf/ambari/blob/8a7bac7e/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 2cec61d..78f68ef 100644
--- a/ambari-server/src/main/python/ambari_server/serverConfiguration.py
+++ b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
@@ -38,7 +38,7 @@ from ambari_commons.logging_utils import get_debug_mode, print_info_msg, print_w
   set_debug_mode
 from ambari_server.properties import Properties
 from ambari_server.userInput import get_validated_string_input
-from ambari_server.utils import compare_versions, locate_file
+from ambari_server.utils import compare_versions, locate_file, on_powerpc
 from ambari_server.ambariPath import AmbariPath
 
 
@@ -174,6 +174,9 @@ CHECK_AMBARI_KRB_JAAS_CONFIGURATION_PROPERTY = "kerberos.check.jaas.configuratio
 # JDK
 JDK_RELEASES="java.releases"
 
+if on_powerpc():
+  JDK_RELEASES += ".ppc64le"
+
 VIEWS_DIR_PROPERTY = "views.dir"
 
 ACTIVE_INSTANCE_PROPERTY = "active.instance"

http://git-wip-us.apache.org/repos/asf/ambari/blob/8a7bac7e/ambari-server/src/main/python/ambari_server/serverSetup.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/serverSetup.py b/ambari-server/src/main/python/ambari_server/serverSetup.py
index cfbe505..aef3d8d 100644
--- a/ambari-server/src/main/python/ambari_server/serverSetup.py
+++ b/ambari-server/src/main/python/ambari_server/serverSetup.py
@@ -588,6 +588,7 @@ class JDKSetup(object):
   def _populate_jdk_configs(self, properties, jdk_num):
     if properties.has_key(JDK_RELEASES):
       jdk_names = properties[JDK_RELEASES].split(',')
+      jdk_names = filter(None, jdk_names)
       jdks = []
       for jdk_name in jdk_names:
         jdkR = JDKRelease.from_properties(properties, jdk_name)

http://git-wip-us.apache.org/repos/asf/ambari/blob/8a7bac7e/ambari-server/src/main/python/ambari_server/utils.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/utils.py b/ambari-server/src/main/python/ambari_server/utils.py
index 4c8304b..f65ceed 100644
--- a/ambari-server/src/main/python/ambari_server/utils.py
+++ b/ambari-server/src/main/python/ambari_server/utils.py
@@ -26,6 +26,7 @@ import time
 import glob
 import subprocess
 import logging
+import platform
 from ambari_commons import OSConst,OSCheck
 
 logger = logging.getLogger(__name__)
@@ -302,3 +303,8 @@ def check_reverse_lookup():
   except socket.error:
     pass
   return False
+
+def on_powerpc():
+  """ True if we are running on a Power PC platform."""
+  return platform.processor() == 'powerpc' or \
+         platform.machine().startswith('ppc')