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

[03/50] [abbrv] ambari git commit: AMBARI-22379 : get_phoenix_query_server_hosts is undefined in hbase service_advisor. (Ted Yu via avijayan)

AMBARI-22379 : get_phoenix_query_server_hosts is undefined in hbase service_advisor. (Ted Yu via avijayan)


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

Branch: refs/heads/branch-feature-AMBARI-22008
Commit: 74e4d2131f22fe635adb61b045da99303d4582f6
Parents: 61d4589
Author: Aravindan Vijayan <av...@hortonworks.com>
Authored: Wed Nov 8 11:14:54 2017 -0800
Committer: Attila Magyar <am...@hortonworks.com>
Committed: Thu Nov 16 16:35:25 2017 +0100

----------------------------------------------------------------------
 .../common-services/HBASE/2.0.0.3.0/service_advisor.py  | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/74e4d213/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/service_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/service_advisor.py b/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/service_advisor.py
index f9d1a59..9dc5708 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/service_advisor.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/service_advisor.py
@@ -461,6 +461,16 @@ class HBASERecommender(service_advisor.ServiceAdvisor):
     else:
       putHbaseSiteProperty('hbase.master.ui.readonly', 'false')
 
+  """
+  Returns the list of Phoenix Query Server host names, or None.
+  """
+  def get_phoenix_query_server_hosts(self, services, hosts):
+    if len(hosts['items']) > 0:
+      phoenix_query_server_hosts = self.getHostsWithComponent("HBASE", "PHOENIX_QUERY_SERVER", services, hosts)
+      if phoenix_query_server_hosts is None:
+        return []
+      return [host['Hosts']['host_name'] for host in phoenix_query_server_hosts]
+
 
   def recommendHBASEConfigurationsFromHDP26(self, configurations, clusterData, services, hosts):
     if 'hbase-env' in services['configurations'] and 'hbase_user' in services['configurations']['hbase-env']['properties']:
@@ -672,4 +682,4 @@ class HBASEValidator(service_advisor.ServiceAdvisor):
                                   " {0} needs to contain {1} instead of {2}".format(prop_name,prop_val,exclude_val))})
 
     validationProblems = self.toConfigurationValidationProblems(validationItems, "hbase-site")
-    return validationProblems
\ No newline at end of file
+    return validationProblems