You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2016/04/06 22:52:16 UTC

ambari git commit: AMBARI-15732. zeppelin_log_dir change leads to failures for different Zeppelin Notebook service actions. (Sagar Kulkarni via yusaku)

Repository: ambari
Updated Branches:
  refs/heads/trunk 21b82cc4e -> b02680091


AMBARI-15732. zeppelin_log_dir change leads to failures for different Zeppelin Notebook service actions. (Sagar Kulkarni via yusaku)


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

Branch: refs/heads/trunk
Commit: b02680091efcf9b392d40f65f0a1a7cc99550159
Parents: 21b82cc
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Wed Apr 6 13:51:35 2016 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Wed Apr 6 13:52:11 2016 -0700

----------------------------------------------------------------------
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py    | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b0268009/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index c24b3fa..9b35c70 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -44,8 +44,8 @@ class Master(Script):
 
     Execute('chown -R ' + params.zeppelin_user + ':' + params.zeppelin_group + ' ' + params.zeppelin_dir)
 
-    # create the log, pid, zeppelin dirs
-    Directory([params.zeppelin_pid_dir, params.zeppelin_log_dir, params.zeppelin_dir],
+    # create the pid and zeppelin dirs
+    Directory([params.zeppelin_pid_dir, params.zeppelin_dir],
               owner=params.zeppelin_user,
               group=params.zeppelin_group,
               cd_access="a",
@@ -113,11 +113,22 @@ class Master(Script):
 
     params.HdfsResource(None, action="execute")
 
+  def create_zeppelin_log_dir(self, env):
+    import params
+    env.set_params(params)
+    Directory([params.zeppelin_log_dir],
+              owner=params.zeppelin_user,
+              group=params.zeppelin_group,
+              cd_access="a",
+              mode=0755
+              )
+
   def configure(self, env):
     import params
     import status_params
     env.set_params(params)
     env.set_params(status_params)
+    self.create_zeppelin_log_dir(env)
 
     # write out zeppelin-site.xml
     XmlConfig("zeppelin-site.xml",
@@ -133,6 +144,7 @@ class Master(Script):
 
   def stop(self, env):
     import params
+    self.create_zeppelin_log_dir(env)
     Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh stop >> ' + params.zeppelin_log_file,
             user=params.zeppelin_user)