You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by mi...@apache.org on 2016/04/20 01:38:44 UTC
ambari git commit: AMBARI-15954: PXF Check fails on Kerberized
cluster without a YARN component (Lav Jain via mithmatt)
Repository: ambari
Updated Branches:
refs/heads/trunk 43567ff1d -> 86dece09b
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/86dece09
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/86dece09
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/86dece09
Branch: refs/heads/trunk
Commit: 86dece09b5e78c2fd3094344d62953281289982d
Parents: 43567ff
Author: Matt <mm...@pivotal.io>
Authored: Tue Apr 19 16:31:09 2016 -0700
Committer: Matt <mm...@pivotal.io>
Committed: Tue Apr 19 16:31:09 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/86dece09/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/86dece09/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: