ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [26/50] [abbrv] ambari git commit: AMBARI-22523. Service config changes on hdp + hdf cluster throws Consistency check failed. (mpapirkovskyy)
Date Thu, 07 Dec 2017 14:03:03 GMT
AMBARI-22523. Service config changes on hdp + hdf cluster throws Consistency check failed.
(mpapirkovskyy)


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

Branch: refs/heads/branch-3.0-perf
Commit: 020e15281e6466ae436d228dcc7428c86560882a
Parents: 73d99d8
Author: Myroslav Papirkovskyi <mpapyrkovskyy@hortonworks.com>
Authored: Mon Nov 20 17:19:12 2017 +0200
Committer: Myroslav Papirkovskyi <mpapyrkovskyy@hortonworks.com>
Committed: Tue Nov 28 18:31:29 2017 +0200

----------------------------------------------------------------------
 .../resources/stacks/HDP/2.6/services/stack_advisor.py   |  3 +++
 .../test/python/stacks/2.6/common/test_stack_advisor.py  | 11 +++++++++++
 2 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/020e1528/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
index fc12d37..6951282 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
@@ -640,6 +640,9 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
         else:
             druid_broker_host_port = "localhost:8083"
 
+        druid_metadata_uri = ""
+        druid_metadata_user = ""
+        druid_metadata_type = ""
         if 'druid-common' in services['configurations']:
             druid_metadata_uri = services['configurations']['druid-common']['properties']['druid.metadata.storage.connector.connectURI']
             druid_metadata_type = services['configurations']['druid-common']['properties']['druid.metadata.storage.type']

http://git-wip-us.apache.org/repos/asf/ambari/blob/020e1528/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py
index f4c5508..b112ffb 100644
--- a/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py
@@ -1949,6 +1949,17 @@ class TestHDP26StackAdvisor(TestCase):
     self.stackAdvisor.recommendHIVEConfigurations(recommendedConfigurations, clusterData,
services, hosts)
     self.assertEquals(recommendedConfigurations, expected)
 
+    # case there are not druid-common configs present
+    del services['configurations']['druid-common']
+    expected['hive-interactive-site']['properties']['hive.druid.broker.address.default']
= 'c6401.ambari.apache.org:8083'
+    expected['hive-interactive-site']['properties']['hive.druid.metadata.uri'] = ''
+    expected['hive-interactive-site']['properties']['hive.druid.metadata.username'] = ''
+    expected['hive-interactive-site']['properties']['hive.druid.metadata.db.type'] = ''
+
+    recommendedConfigurations = {}
+    self.stackAdvisor.recommendHIVEConfigurations(recommendedConfigurations, clusterData,
services, hosts)
+    self.assertEquals(recommendedConfigurations, expected)
+
 
   def test_recommendHBASEConfigurations(self):
     configurations = {


Mime
View raw message