ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject git commit: Revert "AMBARI-6709 After Namenode is moved via Ambari the hive metastore namenode hostname is not updated with the new namenode hostname (Dmytro Shkvyra via dsen)"
Date Tue, 05 Aug 2014 23:31:44 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 5a0b5810f -> b240fa307


Revert "AMBARI-6709 After Namenode is moved via Ambari the hive metastore namenode hostname
is not updated with the new namenode hostname (Dmytro Shkvyra via dsen)"

This reverts commit 26d2c9f6e0bb0fdbb1138a3cf3bcdc73b27f1ef8.


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

Branch: refs/heads/trunk
Commit: b240fa30767ce95638c3996c6826493d36229cd0
Parents: 5a0b581
Author: Mahadev Konar <mahadev@apache.org>
Authored: Tue Aug 5 16:31:31 2014 -0700
Committer: Mahadev Konar <mahadev@apache.org>
Committed: Tue Aug 5 16:31:40 2014 -0700

----------------------------------------------------------------------
 .../services/HIVE/package/scripts/hive_service.py  | 13 -------------
 .../2.0.6/services/HIVE/package/scripts/params.py  |  1 -
 .../python/stacks/2.0.6/HIVE/test_hive_server.py   | 17 ++++++-----------
 3 files changed, 6 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b240fa30/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_service.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_service.py
index cd3149e..8a57b01 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_service.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/hive_service.py
@@ -22,7 +22,6 @@ from resource_management import *
 import socket
 import sys
 import time
-from resource_management.core.shell import checked_call
 
 def hive_service(
     name,
@@ -42,9 +41,6 @@ def hive_service(
   process_id_exists = format("ls {pid_file} >/dev/null 2>&1 && ps `cat
{pid_file}` >/dev/null 2>&1")
   
   if action == 'start':
-    if name == 'hiveserver2':
-      check_fs_root()
-
     demon_cmd = format("{cmd}")
     
     Execute(demon_cmd,
@@ -99,12 +95,3 @@ def hive_service(
     Execute(demon_cmd,
             not_if = format("! ({process_id_exists})")
     )
-
-def check_fs_root():
-  import params  
-  fs_root_url = format("{fs_root}{hive_apps_whs_dir}")
-  cmd = "/usr/lib/hive/bin/metatool -listFSRoot 2>/dev/null | grep hdfs://"
-  code, out = checked_call(cmd, user=params.hive_user)
-  if fs_root_url.strip() != out.strip():
-    cmd = format("/usr/lib/hive/bin/metatool -updateLocation {fs_root}{hive_apps_whs_dir}
{out}")
-    Execute(cmd, user=params.hive_user)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/b240fa30/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
index c492f04..5b6ac59 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
@@ -66,7 +66,6 @@ smoke_test_path = format("{tmp_dir}/hiveserver2Smoke.sh")
 smoke_user_keytab = config['configurations']['hadoop-env']['smokeuser_keytab']
 
 _authentication = config['configurations']['core-site']['hadoop.security.authentication']
-fs_root = config['configurations']['core-site']['fs.defaultFS']
 security_enabled = ( not is_empty(_authentication) and _authentication == 'kerberos')
 
 kinit_path_local = functions.get_kinit_path(["/usr/bin", "/usr/kerberos/bin", "/usr/sbin"])

http://git-wip-us.apache.org/repos/asf/ambari/blob/b240fa30/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
index 8eb6bd2..4e7df9d 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
@@ -46,10 +46,9 @@ class TestHiveServer(RMFTestCase):
                               content='log4jproperties\nline2'
     )
     self.assertNoMoreResources()
-
-  @patch("hive_service.check_fs_root")
+  
   @patch("socket.socket")
-  def test_start_default(self, socket_mock, check_fs_root_mock):
+  def test_start_default(self, socket_mock):
     s = socket_mock.return_value
     
     self.executeScript("2.0.6/services/HIVE/package/scripts/hive_server.py",
@@ -130,7 +129,6 @@ class TestHiveServer(RMFTestCase):
     )
 
     self.assertNoMoreResources()
-    self.assertTrue(check_fs_root_mock.called)
     self.assertTrue(socket_mock.called)
     self.assertTrue(s.close.called)
 
@@ -173,11 +171,10 @@ class TestHiveServer(RMFTestCase):
     )
     self.assertNoMoreResources()
 
-  @patch("hive_service.check_fs_root")
   @patch("socket.socket")
-  def test_start_secured(self, socket_mock, check_fs_root_mock):
+  def test_start_secured(self, socket_mock):
     s = socket_mock.return_value
-
+    
     self.executeScript("2.0.6/services/HIVE/package/scripts/hive_server.py",
                        classname = "HiveServer",
                        command = "start",
@@ -209,7 +206,6 @@ class TestHiveServer(RMFTestCase):
     )
 
     self.assertNoMoreResources()
-    self.assertTrue(check_fs_root_mock.called)
     self.assertTrue(socket_mock.called)
     self.assertTrue(s.close.called)
 
@@ -418,11 +414,10 @@ class TestHiveServer(RMFTestCase):
       owner = 'hive',
       group = 'hadoop',
     )
-
-  @patch("hive_service.check_fs_root")
+    
   @patch("time.time")
   @patch("socket.socket")
-  def test_socket_timeout(self, socket_mock, time_mock, check_fs_root_mock):
+  def test_socket_timeout(self, socket_mock, time_mock):        
     s = socket_mock.return_value
     s.connect = MagicMock()    
     s.connect.side_effect = socket.error("")


Mime
View raw message