You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by dm...@apache.org on 2016/12/12 13:51:57 UTC

[2/2] ambari git commit: AMBARI-19150. Stack Advisor Throws Exception On ZooKeeper Configs (dgrinenko via dlysnichenko)

AMBARI-19150. Stack Advisor Throws Exception On ZooKeeper Configs (dgrinenko via dlysnichenko)


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

Branch: refs/heads/branch-2.5
Commit: 30bf4af81a3fa5fd25cae0c9bed06b7d092b5230
Parents: 71767fe
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Mon Dec 12 15:51:05 2016 +0200
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Mon Dec 12 15:51:24 2016 +0200

----------------------------------------------------------------------
 .../main/resources/stacks/HDP/2.0.6/services/stack_advisor.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/30bf4af8/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
index e47743e..fa61944 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py
@@ -379,7 +379,12 @@ class HDP206StackAdvisor(DefaultStackAdvisor):
 
     self.updateMountProperties("hdfs-site", hdfs_mount_properties, configurations, services, hosts)
 
-    dataDirs = hdfsSiteProperties['dfs.datanode.data.dir'].split(",")
+    if hdfsSiteProperties and "dfs.datanode.data.dir" in hdfsSiteProperties and\
+      hdfsSiteProperties["dfs.datanode.data.dir"] is not None:
+
+      dataDirs = hdfsSiteProperties["dfs.datanode.data.dir"].split(",")
+    else:
+      dataDirs = configurations["hdfs-site"]["properties"]["dfs.datanode.data.dir"].split(",")
 
     # dfs.datanode.du.reserved should be set to 10-15% of volume size
     # For each host selects maximum size of the volume. Then gets minimum for all hosts.