ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [2/2] ambari git commit: AMBARI-10095. HiveServer2 does not install/start when running w/o sudo (aonishuk)
Date Mon, 16 Mar 2015 20:42:00 GMT
AMBARI-10095. HiveServer2 does not install/start when running w/o sudo (aonishuk)


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

Branch: refs/heads/branch-2.0.0
Commit: d6f7faa34b0abd011166e59e313c142e1deeb844
Parents: bf5bbb3
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Mon Mar 16 22:41:50 2015 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Mon Mar 16 22:41:50 2015 +0200

----------------------------------------------------------------------
 .../HIVE/0.12.0.2.0/package/scripts/hive_service.py         | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d6f7faa3/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 ef74b87..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
@@ -130,10 +130,11 @@ 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 = format("{metatool_cmd} -listFSRoot 2>/dev/null | grep hdfs:// | grep -v '.db$'")
-  code, out = shell.call(cmd, user=params.hive_user, env={'PATH' : params.execute_path })
+  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 fs_root_url.strip() != out.strip():
     cmd = format("{metatool_cmd} -updateLocation {fs_root}{hive_apps_whs_dir} {out}")
     Execute(cmd,
-            environment= {'PATH' : params.execute_path },
-            user=params.hive_user)
+            user=params.hive_user,
+            environment= {'PATH' : params.execute_path }
+    )


Mime
View raw message