You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jl...@apache.org on 2015/04/09 16:48:19 UTC
[3/3] ambari git commit: Revert "AMBARI-10360. 2.0.1 CLONE - HS2
fails to start when databases exist with LOCATIONs outside of
hive.metastore.warehouse.dirs.(vbrodetskyi)"
Revert "AMBARI-10360. 2.0.1 CLONE - HS2 fails to start when databases exist with LOCATIONs outside of hive.metastore.warehouse.dirs.(vbrodetskyi)"
This reverts commit 7d77b87144b4b4b872f4d84f2c57b69d90460330.
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f35e06fe
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f35e06fe
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f35e06fe
Branch: refs/heads/branch-2.0.0
Commit: f35e06fe2015f57ebaf0d92cc2e4481c8abde190
Parents: 3b11b71
Author: Jayush Luniya <jl...@hortonworks.com>
Authored: Thu Apr 9 07:48:04 2015 -0700
Committer: Jayush Luniya <jl...@hortonworks.com>
Committed: Thu Apr 9 07:48:04 2015 -0700
----------------------------------------------------------------------
.../HIVE/0.12.0.2.0/package/scripts/hive_service.py | 12 +++++-------
.../test/python/stacks/2.0.6/HIVE/test_hive_server.py | 5 ++++-
2 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/f35e06fe/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
index bbd9dee..8c4093f 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
@@ -128,15 +128,13 @@ def hive_service(name, action='start', rolling_restart=False):
def check_fs_root():
import params
+ fs_root_url = format("{fs_root}{hive_apps_whs_dir}")
metatool_cmd = format("hive --config {hive_server_conf_dir} --service metatool")
- cmd = as_user(format("{metatool_cmd} -listFSRoot 2>/dev/null", env={'PATH': params.execute_path}), params.hive_user) \
- + format(" | grep hdfs:// | cut -f1,2,3 -d '/' | grep -v '{fs_root}' | head -1")
+ cmd = as_user(format("{metatool_cmd} -listFSRoot 2>/dev/null", env={'PATH' : params.execute_path }), params.hive_user) + " | grep hdfs:// | grep -v '.db$'"
code, out = shell.call(cmd)
-
- if code == 0 and out.strip() != "" and params.fs_root.strip() != out.strip():
- out = out.strip()
- cmd = format("{metatool_cmd} -updateLocation {fs_root} {out}")
+ if code == 0 and fs_root_url.strip() != out.strip():
+ cmd = format("{metatool_cmd} -updateLocation {fs_root}{hive_apps_whs_dir} {out}")
Execute(cmd,
user=params.hive_user,
- environment={'PATH': params.execute_path}
+ environment= {'PATH' : params.execute_path }
)
http://git-wip-us.apache.org/repos/asf/ambari/blob/f35e06fe/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 287713a..f0d6d7a 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
@@ -58,7 +58,10 @@ class TestHiveServer(RMFTestCase):
self.assert_configure_default()
self.printResources()
-
+ self.assertResourceCalled('Execute', 'hive --config /etc/hive/conf.server --service metatool -updateLocation hdfs://c6401.ambari.apache.org:8020/apps/hive/warehouse ',
+ environment = {'PATH' : "/bin:/usr/lib/hive/bin:/usr/bin"},
+ user = 'hive',
+ )
self.assertResourceCalled('Execute', '/tmp/start_hiveserver2_script /var/log/hive/hive-server2.out /var/log/hive/hive-server2.log /var/run/hive/hive-server.pid /etc/hive/conf.server /var/log/hive',
not_if = 'ls /var/run/hive/hive-server.pid >/dev/null 2>&1 && ps -p `cat /var/run/hive/hive-server.pid` >/dev/null 2>&1',
environment = {'HADOOP_HOME' : '/usr', 'JAVA_HOME':'/usr/jdk64/jdk1.7.0_45'},