Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 68B3518FED for ; Mon, 11 Jan 2016 19:01:10 +0000 (UTC) Received: (qmail 49984 invoked by uid 500); 11 Jan 2016 19:01:10 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 49945 invoked by uid 500); 11 Jan 2016 19:01:10 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 49936 invoked by uid 99); 11 Jan 2016 19:01:10 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jan 2016 19:01:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E3EAFE0A4E; Mon, 11 Jan 2016 19:01:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: alejandro@apache.org To: commits@ambari.apache.org Message-Id: <5877a68d97ee499c8ed46dd40783a428@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) 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 Authored: Fri Jan 8 15:47:27 2016 -0800 Committer: Alejandro Fernandez 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,