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 2018/08/23 04:53:16 UTC
[ambari] branch branch-2.7 updated: AMBARI-24527. Unable to Add
ZooKeeper-Only Host To Cluster With Hadoop (aonishuk)
This is an automated email from the ASF dual-hosted git repository.
aonishuk pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/branch-2.7 by this push:
new 033079e AMBARI-24527. Unable to Add ZooKeeper-Only Host To Cluster With Hadoop (aonishuk)
033079e is described below
commit 033079ebf6731df734dd8ecdfec56c4d861c0e1d
Author: Andrew Onishuk <ao...@hortonworks.com>
AuthorDate: Wed Aug 22 19:56:45 2018 +0300
AMBARI-24527. Unable to Add ZooKeeper-Only Host To Cluster With Hadoop (aonishuk)
---
.../before-START/scripts/shared_initialization.py | 25 +++++++++++-----------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/shared_initialization.py b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/shared_initialization.py
index f14ba96..ef31242 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/shared_initialization.py
@@ -106,18 +106,19 @@ def setup_hadoop():
mode=0644,
content=StaticFile("fast-hdfs-resource.jar")
)
- if params.hadoop_metrics2_properties_content:
- File(os.path.join(params.hadoop_conf_dir, "hadoop-metrics2.properties"),
- owner=params.hdfs_user,
- group=params.user_group,
- content=InlineTemplate(params.hadoop_metrics2_properties_content)
- )
- else:
- File(os.path.join(params.hadoop_conf_dir, "hadoop-metrics2.properties"),
- owner=params.hdfs_user,
- group=params.user_group,
- content=Template("hadoop-metrics2.properties.j2")
- )
+ if os.path.exists(params.hadoop_conf_dir):
+ if params.hadoop_metrics2_properties_content:
+ File(os.path.join(params.hadoop_conf_dir, "hadoop-metrics2.properties"),
+ owner=params.hdfs_user,
+ group=params.user_group,
+ content=InlineTemplate(params.hadoop_metrics2_properties_content)
+ )
+ else:
+ File(os.path.join(params.hadoop_conf_dir, "hadoop-metrics2.properties"),
+ owner=params.hdfs_user,
+ group=params.user_group,
+ content=Template("hadoop-metrics2.properties.j2")
+ )
if params.dfs_type == 'HCFS' and params.has_core_site and 'ECS_CLIENT' in params.component_list:
create_dirs()