You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ma...@apache.org on 2016/06/03 06:35:20 UTC
ambari git commit: AMBARI-16171. Changes to Phoenix QueryServer
Kerberos configuration. (Josh Eshler via mahadev)
Repository: ambari
Updated Branches:
refs/heads/trunk 3ed98f27b -> 66815a1b3
AMBARI-16171. Changes to Phoenix QueryServer Kerberos configuration. (Josh Eshler via mahadev)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/66815a1b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/66815a1b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/66815a1b
Branch: refs/heads/trunk
Commit: 66815a1b33f50a4f457f7ff746ff30958eee590d
Parents: 3ed98f2
Author: Mahadev Konar <ma...@apache.org>
Authored: Thu Jun 2 22:47:09 2016 -0700
Committer: Mahadev Konar <ma...@apache.org>
Committed: Thu Jun 2 23:35:10 2016 -0700
----------------------------------------------------------------------
.../HBASE/0.96.0.2.0/kerberos.json | 5 -----
.../stacks/HDP/2.5/services/HBASE/kerberos.json | 5 -----
.../stacks/HDP/2.5/services/stack_advisor.py | 18 ++++++++++++++----
.../stacks/2.5/common/test_stack_advisor.py | 6 +++---
4 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/66815a1b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/kerberos.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/kerberos.json b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/kerberos.json
index f887f92..d569447 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/kerberos.json
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/kerberos.json
@@ -42,11 +42,6 @@
"hbase.coprocessor.regionserver.classes": "{{hbase_coprocessor_regionserver_classes}}",
"hbase.bulkload.staging.dir": "/apps/hbase/staging"
}
- },
- {
- "core-site": {
- "hadoop.proxyuser.HTTP.hosts": "${clusterHostInfo/phoenix_query_server_hosts}"
- }
}
],
"components": [
http://git-wip-us.apache.org/repos/asf/ambari/blob/66815a1b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HBASE/kerberos.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HBASE/kerberos.json b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HBASE/kerberos.json
index 5cfe42d..8be8bda 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HBASE/kerberos.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HBASE/kerberos.json
@@ -43,11 +43,6 @@
"hbase.bulkload.staging.dir": "/apps/hbase/staging",
"hbase.master.ui.readonly": "true"
}
- },
- {
- "core-site": {
- "hadoop.proxyuser.HTTP.hosts": "${clusterHostInfo/phoenix_query_server_hosts}"
- }
}
],
"components": [
http://git-wip-us.apache.org/repos/asf/ambari/blob/66815a1b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index 413a2f7..379c268 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -196,29 +196,39 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
super(HDP25StackAdvisor, self).recommendHBASEConfigurations(configurations, clusterData, services, hosts)
putHbaseSiteProperty = self.putProperty(configurations, "hbase-site", services)
appendCoreSiteProperty = self.updateProperty(configurations, "core-site", services)
- servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
- if 'KERBEROS' in servicesList:
+ if "cluster-env" in services["configurations"] \
+ and "security_enabled" in services["configurations"]["cluster-env"]["properties"] \
+ and services["configurations"]["cluster-env"]["properties"]["security_enabled"].lower() == "true":
+ # Set the master's UI to readonly
putHbaseSiteProperty('hbase.master.ui.readonly', 'true')
phoenix_query_server_hosts = self.get_phoenix_query_server_hosts(services, hosts)
+ Logger.debug("Calculated Phoenix Query Server hosts: %s" % str(phoenix_query_server_hosts))
if phoenix_query_server_hosts:
+ Logger.debug("Attempting to update hadoop.proxyuser.HTTP.hosts with %s" % str(phoenix_query_server_hosts))
# The PQS hosts we want to ensure are set
new_value = ','.join(phoenix_query_server_hosts)
# Compute the unique set of hosts for the property
def updateCallback(originalValue, newValue):
+ Logger.debug("Original hadoop.proxyuser.HTTP.hosts value %s, appending %s" % (originalValue, newValue))
# Only update the original value if it's not whitespace only
if originalValue and not originalValue.isspace():
hosts = originalValue.split(',')
# Add in the new hosts if we have some
if newValue and not newValue.isspace():
hosts.extend(newValue.split(','))
- # Return the combined (unique) list of hosts
- return ','.join(set(hosts))
+ # Return the combined (uniqued) list of hosts
+ result = ','.join(set(hosts))
+ Logger.debug("Setting final to %s" % result)
+ return result
else:
+ Logger.debug("Setting final value to %s" % newValue)
return newValue
# Update the proxyuser setting, deferring to out callback to merge results together
appendCoreSiteProperty('hadoop.proxyuser.HTTP.hosts', new_value, updateCallback)
+ else:
+ Logger.debug("No phoenix query server hosts to update")
else:
putHbaseSiteProperty('hbase.master.ui.readonly', 'false')
http://git-wip-us.apache.org/repos/asf/ambari/blob/66815a1b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
index d61de7b..46e9f47 100644
--- a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
@@ -5716,7 +5716,7 @@ class TestHDP25StackAdvisor(TestCase):
self.assertTrue('properties' in configurations['core-site'])
# Avoid an unnecessary sort in the stack advisor, sort here for easy comparison
actualHosts = configurations['core-site']['properties']['hadoop.proxyuser.HTTP.hosts']
- expectedHosts = configurations['core-site']['properties']['hadoop.proxyuser.HTTP.hosts']
+ expectedHosts = expected_configuration['core-site']['properties']['hadoop.proxyuser.HTTP.hosts']
self.assertEquals(splitAndSort(actualHosts), splitAndSort(expectedHosts))
# Do a simple check for hbase-site
self.assertTrue('hbase-site' in configurations)
@@ -5841,7 +5841,7 @@ class TestHDP25StackAdvisor(TestCase):
self.assertTrue('hadoop.proxyuser.HTTP.hosts' in configurations['core-site']['properties'])
# Avoid an unnecessary sort in the stack advisor, sort here for easy comparison
actualHosts = configurations['core-site']['properties']['hadoop.proxyuser.HTTP.hosts']
- expectedHosts = configurations['core-site']['properties']['hadoop.proxyuser.HTTP.hosts']
+ expectedHosts = expected_configuration['core-site']['properties']['hadoop.proxyuser.HTTP.hosts']
self.assertEquals(splitAndSort(actualHosts), splitAndSort(expectedHosts))
# Do a simple check for hbase-site
self.assertTrue('hbase-site' in configurations)
@@ -5967,7 +5967,7 @@ class TestHDP25StackAdvisor(TestCase):
self.assertTrue('properties' in configurations['core-site'])
# Avoid an unnecessary sort in the stack advisor, sort here for easy comparison
actualHosts = configurations['core-site']['properties']['hadoop.proxyuser.HTTP.hosts']
- expectedHosts = configurations['core-site']['properties']['hadoop.proxyuser.HTTP.hosts']
+ expectedHosts = expected_configuration['core-site']['properties']['hadoop.proxyuser.HTTP.hosts']
self.assertEquals(splitAndSort(actualHosts), splitAndSort(expectedHosts))
# Do a simple check for hbase-site
self.assertTrue('hbase-site' in configurations)