This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.6 by this push:
     new f91518c  AMBARI-24671. Workaround for non-atomic directory creation 
(#2357)
f91518c is described below

commit f91518cbe132256dcfb1cab90277c1d425e1c7e1
Author: Doroszlai, Attila <6454655+adorosz...@users.noreply.github.com>
AuthorDate: Fri Sep 21 17:05:18 2018 +0200

    AMBARI-24671. Workaround for non-atomic directory creation (#2357)
---
 .../src/main/resources/scripts/Ambaripreupload.py  | 36 ++++++++++++++++++++--
 1 file changed, 33 insertions(+), 3 deletions(-)

diff --git a/ambari-server/src/main/resources/scripts/Ambaripreupload.py 
b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
index 3fb56f0..e0595a8 100644
--- a/ambari-server/src/main/resources/scripts/Ambaripreupload.py
+++ b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
@@ -312,10 +312,40 @@ with Environment() as env:
     with closing(tarfile.open(params.slider_tarball, "w:gz")) as tar:
       for filepath in glob.glob(format("{slider_lib_dir}/*.jar")):
         tar.add(os.path.realpath(filepath), arcname=os.path.basename(filepath))
-      
+
   env.set_params(params)
   hadoop_conf_dir = params.hadoop_conf_dir
-   
+
+  Directory('/var/lib/ambari-agent/tmp/hadoop_java_io_tmpdir',
+            owner=params.hdfs_user,
+            group=params.user_group,
+            mode=01777
+  )
+  Directory('/var/log/hadoop',
+            create_parents = True,
+            owner='root',
+            group=params.user_group,
+            mode=0775,
+            cd_access='a',
+  )
+  Directory('/var/run/hadoop',
+            create_parents = True,
+            owner='root',
+            group='root',
+            cd_access='a',
+  )
+  Directory('/tmp/hadoop-hdfs',
+            create_parents = True,
+            owner=params.hdfs_user,
+            cd_access='a',
+  )
+  Directory('/tmp/hbase-hbase',
+            owner='hbase',
+            mode=0775,
+            create_parents = True,
+            cd_access="a",
+  )
+
   oozie_libext_dir = params.oozie_libext_dir
   sql_driver_filename = os.path.basename(SQL_DRIVER_PATH)
   oozie_home=params.oozie_home
@@ -460,4 +490,4 @@ with Environment() as env:
       sudo = True
     )
 
-  print "Ambari preupload script completed."
\ No newline at end of file
+  print "Ambari preupload script completed."

Reply via email to