You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2015/03/16 21:41:59 UTC

[1/2] ambari git commit: AMBARI-10095. HiveServer2 does not install/start when running w/o sudo (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.0 bf5bbb3fd -> d6f7faa34
  refs/heads/trunk d8b862388 -> fae1eb7f3


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/fae1eb7f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fae1eb7f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fae1eb7f

Branch: refs/heads/trunk
Commit: fae1eb7f385eb1924fdd98152d58bde53c5d0c1b
Parents: d8b8623
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Mar 16 22:41:48 2015 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Mar 16 22:41:48 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/fae1eb7f/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 }
+    )


[2/2] ambari git commit: AMBARI-10095. HiveServer2 does not install/start when running w/o sudo (aonishuk)

Posted by ao...@apache.org.
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 <ao...@hortonworks.com>
Authored: Mon Mar 16 22:41:50 2015 +0200
Committer: Andrew Onishuk <ao...@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 }
+    )