You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ad...@apache.org on 2018/09/22 19:09:13 UTC
[ambari] branch trunk updated: AMBARI-24671. Workaround for
non-atomic directory creation (#2361)
This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 40a3040 AMBARI-24671. Workaround for non-atomic directory creation (#2361)
40a3040 is described below
commit 40a3040aab66a05cc2dec198cbc9cee3cdc7a7b2
Author: Doroszlai, Attila <64...@users.noreply.github.com>
AuthorDate: Sat Sep 22 21:09:08 2018 +0200
AMBARI-24671. Workaround for non-atomic directory creation (#2361)
---
.../src/main/resources/scripts/Ambaripreupload.py | 35 ++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/ambari-server/src/main/resources/scripts/Ambaripreupload.py b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
index dca9bb5..ff4f0d7 100644
--- a/ambari-server/src/main/resources/scripts/Ambaripreupload.py
+++ b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
@@ -36,6 +36,7 @@ from resource_management.core import File
from resource_management.core import shell
from resource_management.core.environment import Environment
from resource_management.core.logger import Logger
+from resource_management.core.resources.system import Directory
from resource_management.core.resources.system import Execute
from resource_management.core.source import StaticFile
from resource_management.libraries import ConfigDictionary
@@ -324,6 +325,40 @@ with Environment() as env:
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('/var/run/hadoop/hdfs',
+ owner=params.hdfs_user,
+ 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