ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alejan...@apache.org
Subject ambari git commit: AMBARI-14596. Install cluster failed on Accumulo as tried to write config when hadoop conf dir is missing (alejandro)
Date Mon, 11 Jan 2016 19:01:09 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk f15ca1a09 -> 19d424c72


AMBARI-14596. Install cluster failed on Accumulo as tried to write config when hadoop conf
dir is missing (alejandro)


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

Branch: refs/heads/trunk
Commit: 19d424c7209cf1e728285376e2401b7e11b33ae2
Parents: f15ca1a
Author: Alejandro Fernandez <afernandez@hortonworks.com>
Authored: Fri Jan 8 15:47:27 2016 -0800
Committer: Alejandro Fernandez <afernandez@hortonworks.com>
Committed: Mon Jan 11 10:57:55 2016 -0800

----------------------------------------------------------------------
 .../hooks/after-INSTALL/scripts/shared_initialization.py    | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/19d424c7/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
index 98b7eb5..e7a3a82 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
@@ -48,7 +48,14 @@ def setup_config():
   import params
   stackversion = params.stack_version_unformatted
   Logger.info("FS Type: {0}".format(params.dfs_type))
-  if params.has_namenode or stackversion.find('Gluster') >= 0 or params.dfs_type == 'HCFS':
+
+  is_hadoop_conf_dir_present = False
+  if params.hadoop_conf_dir is not None and os.path.exists(params.hadoop_conf_dir):
+    is_hadoop_conf_dir_present = True
+  else:
+    Logger.warning("Parameter hadoop_conf_dir is missing or directory does not exist.")
+
+  if is_hadoop_conf_dir_present and (params.has_namenode or stackversion.find('Gluster')
>= 0 or params.dfs_type == 'HCFS'):
     # create core-site only if the hadoop config diretory exists
     XmlConfig("core-site.xml",
               conf_dir=params.hadoop_conf_dir,


Mime
View raw message