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/b04e142b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b04e142b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b04e142b Branch: refs/heads/branch-feature-AMBARI-20859 Commit: b04e142b3f80d4713ed154e17c0ab877d46500a4 Parents: 08d3826 Author: Aravindan Vijayan <avija...@hortonworks.com> Authored: Wed Nov 8 11:14:54 2017 -0800 Committer: Aravindan Vijayan <avija...@hortonworks.com> Committed: Wed Nov 8 11:14:54 2017 -0800 ---------------------------------------------------------------------- .../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/b04e142b/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