Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1B4C6200BB7 for ; Wed, 9 Nov 2016 22:01:30 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 19B74160AFA; Wed, 9 Nov 2016 21:01:30 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 61AD5160AEB for ; Wed, 9 Nov 2016 22:01:29 +0100 (CET) Received: (qmail 29835 invoked by uid 500); 9 Nov 2016 21:01:28 -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 29822 invoked by uid 99); 9 Nov 2016 21:01:28 -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; Wed, 09 Nov 2016 21:01:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4CB71E188C; Wed, 9 Nov 2016 21:01:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mithmatt@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-18837: HAWQ Master fails to start when webhdfs is disabled (mithmatt) Date: Wed, 9 Nov 2016 21:01:28 +0000 (UTC) archived-at: Wed, 09 Nov 2016 21:01:30 -0000 Repository: ambari Updated Branches: refs/heads/trunk 3bf40d0d4 -> f33dd9e38 AMBARI-18837: HAWQ Master fails to start when webhdfs is disabled (mithmatt) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f33dd9e3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f33dd9e3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f33dd9e3 Branch: refs/heads/trunk Commit: f33dd9e3821facb4094966d15c6c8549d5ec95a3 Parents: 3bf40d0 Author: Matt Authored: Wed Nov 9 13:01:11 2016 -0800 Committer: Matt Committed: Wed Nov 9 13:01:11 2016 -0800 ---------------------------------------------------------------------- .../common-services/HAWQ/2.0.0/package/scripts/params.py | 6 ++++++ .../src/test/python/common-services/HAWQ/test_hawqmaster.py | 4 ++++ 2 files changed, 10 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/f33dd9e3/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py index 440a3e6..e2dbd7b 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py @@ -20,6 +20,8 @@ import functools import hawq_constants from resource_management import Script from resource_management.core.resources.system import File +from resource_management.libraries.functions import conf_select +from resource_management.libraries.functions import stack_select from resource_management.libraries.functions.default import default from resource_management.libraries.resources.hdfs_resource import HdfsResource from resource_management.libraries.resources.xml_config import XmlConfig @@ -60,6 +62,8 @@ hawq_all_hosts = sorted(set(hawq_master_hosts + hawqsegment_hosts)) # HDFS hdfs_site = config['configurations']['hdfs-site'] default_fs = config['configurations']['core-site']['fs.defaultFS'] +hadoop_bin_dir = stack_select.get_hadoop_dir("bin") +hadoop_conf_dir = conf_select.get_hadoop_conf_dir() security_enabled = config['configurations']['cluster-env']['security_enabled'] hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab'] @@ -78,6 +82,8 @@ HdfsResource = functools.partial(HdfsResource, keytab=hdfs_user_keytab, kinit_path_local=kinit_path_local, principal_name=hdfs_principal_name, + hadoop_bin_dir = hadoop_bin_dir, + hadoop_conf_dir = hadoop_conf_dir, hdfs_site=hdfs_site, default_fs=default_fs, immutable_paths = get_not_managed_resources()) http://git-wip-us.apache.org/repos/asf/ambari/blob/f33dd9e3/ambari-server/src/test/python/common-services/HAWQ/test_hawqmaster.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/common-services/HAWQ/test_hawqmaster.py b/ambari-server/src/test/python/common-services/HAWQ/test_hawqmaster.py index a483656..3b09309 100644 --- a/ambari-server/src/test/python/common-services/HAWQ/test_hawqmaster.py +++ b/ambari-server/src/test/python/common-services/HAWQ/test_hawqmaster.py @@ -78,6 +78,8 @@ class TestHawqMaster(HawqBaseTestCase): self.assertResourceCalled('HdfsResource', '/hawq_data', immutable_paths = self.DEFAULT_IMMUTABLE_PATHS, default_fs = u'hdfs://c6401.ambari.apache.org:8020', + hadoop_bin_dir = '/usr/phd/current/hadoop-client/bin', + hadoop_conf_dir = '/usr/phd/current/hadoop-client/conf', hdfs_site = self.getConfig()['configurations']['hdfs-site'], type = 'directory', action = ['create_on_execute'], @@ -95,6 +97,8 @@ class TestHawqMaster(HawqBaseTestCase): self.assertResourceCalled('HdfsResource', None, immutable_paths = self.DEFAULT_IMMUTABLE_PATHS, default_fs = u'hdfs://c6401.ambari.apache.org:8020', + hadoop_bin_dir = '/usr/phd/current/hadoop-client/bin', + hadoop_conf_dir = '/usr/phd/current/hadoop-client/conf', hdfs_site = self.getConfig()['configurations']['hdfs-site'], action = ['execute'], user = u'hdfs',