ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mithm...@apache.org
Subject ambari git commit: AMBARI-15954: PXF Check fails on Kerberized cluster without a YARN component (Lav Jain via mithmatt)
Date Tue, 19 Apr 2016 23:41:22 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 e397e3f9a -> bc0009b08


AMBARI-15954: PXF Check fails on Kerberized cluster without a YARN component (Lav Jain via
mithmatt)


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

Branch: refs/heads/branch-2.2
Commit: bc0009b0890c482afde47660e45d3f4db7755acb
Parents: e397e3f
Author: Matt <mmathew@pivotal.io>
Authored: Tue Apr 19 16:40:26 2016 -0700
Committer: Matt <mmathew@pivotal.io>
Committed: Tue Apr 19 16:40:26 2016 -0700

----------------------------------------------------------------------
 .../common-services/PXF/3.0.0/package/scripts/params.py |  3 ---
 .../PXF/3.0.0/package/scripts/service_check.py          | 12 ++++++++++--
 2 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bc0009b0/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
index ae0c80c..eed2d18 100644
--- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py
@@ -61,9 +61,6 @@ is_hbase_installed = default("/clusterHostInfo/hbase_master_hosts", None)
is not
 #Hive
 is_hive_installed = default("/clusterHostInfo/hive_server_host", None) is not None
 
-#YARN
-is_yarn_installed = default("/clusterHostInfo/rm_host", None) is not None
-
 # HDFS
 hdfs_site = config['configurations']['hdfs-site']
 default_fs = config['configurations']['core-site']['fs.defaultFS']

http://git-wip-us.apache.org/repos/asf/ambari/blob/bc0009b0/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py
b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py
index fe3c17e..c39a85e 100644
--- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py
@@ -142,6 +142,14 @@ class PXFServiceCheck(Script):
     Logger.error(error_msg)
     self.checks_failed += 1
 
+  def __check_yarn_installed(self):
+    """
+    Checks if any YARN/MAPREDUCE2 component is installed on this host
+    """
+    component_list = default("/localComponents", [])
+    Logger.info("Checking for YARN/MAPREDUCE2 components in {0}".format(str(component_list)))
+    return any([component in ["RESOURCEMANAGER", "NODEMANAGER", "HISTORYSERVER", "YARN_CLIENT",
"MAPREDUCE2_CLIENT"] for component in component_list])
+
   # HDFS Routines
   def run_hdfs_tests(self):
     """
@@ -151,9 +159,9 @@ class PXFServiceCheck(Script):
     Logger.info("Running PXF HDFS service checks")
 
     # YARN is required to access HDFS through PXF if security is enabled
-    if params.security_enabled and not params.is_yarn_installed:
+    if params.security_enabled and not self.__check_yarn_installed():
       self.checks_failed += 1
-      Logger.error("HDFS test prerequisite Failed: PXF in a Kerberos-secured cluster requires
YARN to be installed due to a dependency on YARN libraries.")
+      Logger.error("HDFS test prerequisite Failed: PXF in a Kerberos-secured cluster requires
a YARN component to be installed on this host due to a dependency on YARN libraries.")
       return
 
     try:


Mime
View raw message