ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stoa...@apache.org
Subject ambari git commit: AMBARI-18567. Cannot start Oozie if WebHDFS is disabled. (Attila Doroszlai via stoader)
Date Fri, 14 Oct 2016 09:26:15 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 2b35c980c -> 78f43507f


AMBARI-18567. Cannot start Oozie if WebHDFS is disabled. (Attila Doroszlai via stoader)


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

Branch: refs/heads/trunk
Commit: 78f43507f883f527f41c6a3ab71ff40bbd433647
Parents: 2b35c98
Author: Attila Doroszlai <adoroszlai@hortonworks.com>
Authored: Fri Oct 14 11:15:27 2016 +0200
Committer: Toader, Sebastian <stoader@hortonworks.com>
Committed: Fri Oct 14 11:15:27 2016 +0200

----------------------------------------------------------------------
 .../OOZIE/4.0.0.2.0/package/scripts/oozie_service.py      |  2 +-
 .../test/python/stacks/2.0.6/OOZIE/test_oozie_server.py   | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/78f43507/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py
index a5bd59d..5fcbf45 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py
@@ -24,7 +24,7 @@ import os
 from oozie import copy_atlas_hive_hook_to_dfs_share_lib
 
 # Resource Managemente Imports
-from resource_management.core import sudo
+from resource_management.core import shell, sudo
 from resource_management.core.shell import as_user
 from resource_management.core.logger import Logger
 from resource_management.core.resources.service import Service

http://git-wip-us.apache.org/repos/asf/ambari/blob/78f43507/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
index 2a512f4..bfa6d45 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
@@ -510,6 +510,9 @@ class TestOozieServer(RMFTestCase):
   @patch("os.path.isfile")
   @patch('os.path.exists', new=MagicMock(side_effect = [False, True, False, True]))
   def test_start_default(self, isfile_mock, call_mocks):
+    self._test_start(isfile_mock, call_mocks)
+
+  def _test_start(self, isfile_mock, call_mocks):
     isfile_mock.return_value = True
     call_mocks = MagicMock(return_value=(0, "New Oozie WAR file with added"))
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/oozie_server.py",
@@ -568,6 +571,13 @@ class TestOozieServer(RMFTestCase):
     )
     self.assertNoMoreResources()
 
+  @patch.object(WebHDFSUtil, 'is_webhdfs_available', return_value=False)
+  @patch.object(shell, "call")
+  @patch("os.path.isfile")
+  @patch('os.path.exists', new=MagicMock(side_effect = [False, True, False, True]))
+  def test_start_no_webhdfs(self, webhdfsutil_mock, isfile_mock, call_mocks):
+    self._test_start(isfile_mock, call_mocks)
+
   def test_stop_default(self):
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/oozie_server.py",
                          classname = "OozieServer",


Mime
View raw message