ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smoha...@apache.org
Subject ambari git commit: AMBARI-12316. Phoenix system tests fail before finalize
Date Wed, 08 Jul 2015 00:37:38 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 bf9a82b39 -> 8379fb8f4


AMBARI-12316. Phoenix system tests fail before finalize


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

Branch: refs/heads/branch-2.1
Commit: 8379fb8f44de3d78ebf9dcd655d54125d0fc85d8
Parents: bf9a82b
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Tue Jul 7 17:34:58 2015 -0700
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Tue Jul 7 17:37:09 2015 -0700

----------------------------------------------------------------------
 .../HBASE/0.96.0.2.0/package/scripts/hbase_client.py         | 8 ++++++++
 .../src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py  | 6 ++++--
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8379fb8f/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_client.py
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_client.py
index 9036bb3..f772a11 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_client.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_client.py
@@ -59,6 +59,14 @@ class HbaseClientDefault(HbaseClient):
       conf_select.select(params.stack_name, "hbase", params.version)
       hdp_select.select("hbase-client", params.version)
 
+      # phoenix may not always be deployed
+      try:
+        hdp_select.select("phoenix-client", params.version)
+      except Exception as e:
+        print "Ignoring error due to missing phoenix-client"
+        print str(e)
+
+
       # set all of the hadoop clients since hbase client is upgraded as part
       # of the final "CLIENTS" group and we need to ensure that hadoop-client
       # is also set

http://git-wip-us.apache.org/repos/asf/ambari/blob/8379fb8f/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
index cf923f1..d2fa8ab 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
@@ -201,6 +201,7 @@ class TestHBaseClient(RMFTestCase):
                    mocks_dict = mocks_dict)
 
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'hbase-client', '2.2.1.0-2067'),
sudo=True)
+    self.assertResourceCalled('Execute', ('hdp-select', 'set', 'phoenix-client', '2.2.1.0-2067'),
sudo=True)
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'hadoop-client', '2.2.1.0-2067'),
sudo=True)
     self.assertEquals(1, mocks_dict['call'].call_count)
 
@@ -226,10 +227,11 @@ class TestHBaseClient(RMFTestCase):
                        mocks_dict = mocks_dict)
 
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hbase-client', version),
sudo=True)
+    self.assertResourceCalled('Execute', ('hdp-select', 'set', 'phoenix-client', version),
sudo=True)
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hadoop-client', version),
sudo=True)
 
     self.assertEquals(3, mocks_dict['call'].call_count)
-    self.assertEquals(5, mocks_dict['checked_call'].call_count)
+    self.assertEquals(6, mocks_dict['checked_call'].call_count)
     self.assertEquals(
       ('conf-select', 'set-conf-dir', '--package', 'hbase', '--stack-version', '2.3.0.0-1234',
'--conf-version', '0'),
        mocks_dict['checked_call'].call_args_list[1][0][0])
@@ -238,7 +240,7 @@ class TestHBaseClient(RMFTestCase):
        mocks_dict['call'].call_args_list[0][0][0])
     self.assertEquals(
       ('conf-select', 'set-conf-dir', '--package', 'hadoop', '--stack-version', '2.3.0.0-1234',
'--conf-version', '0'),
-       mocks_dict['checked_call'].call_args_list[3][0][0])
+       mocks_dict['checked_call'].call_args_list[4][0][0])
     self.assertEquals(
       ('conf-select', 'create-conf-dir', '--package', 'hadoop', '--stack-version', '2.3.0.0-1234',
'--conf-version', '0'),
        mocks_dict['call'].call_args_list[1][0][0])


Mime
View raw message