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 9ABCB200B91 for ; Thu, 15 Sep 2016 00:39:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 996DA160AD4; Wed, 14 Sep 2016 22:39:45 +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 E24A7160AB4 for ; Thu, 15 Sep 2016 00:39:44 +0200 (CEST) Received: (qmail 19087 invoked by uid 500); 14 Sep 2016 22:39:44 -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 19078 invoked by uid 99); 14 Sep 2016 22:39:44 -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, 14 Sep 2016 22:39:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D8E1ADFE61; Wed, 14 Sep 2016 22:39:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: swapan@apache.org To: commits@ambari.apache.org Message-Id: <81f73f2709c44e8cbc7cd3208fe634df@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-18393. Hive Server Interactive (HSI) fails to start with 'Permission denied' for User Hive, if HSI starts before HS2. Date: Wed, 14 Sep 2016 22:39:43 +0000 (UTC) archived-at: Wed, 14 Sep 2016 22:39:45 -0000 Repository: ambari Updated Branches: refs/heads/branch-2.5 d21f1f6e7 -> 7594857e4 AMBARI-18393. Hive Server Interactive (HSI) fails to start with 'Permission denied' for User Hive, if HSI starts before HS2. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7594857e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7594857e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7594857e Branch: refs/heads/branch-2.5 Commit: 7594857e40da29baa3ff80832b04b57e4ffcf90d Parents: d21f1f6 Author: Swapan Shridhar Authored: Wed Sep 14 15:37:51 2016 -0700 Committer: Swapan Shridhar Committed: Wed Sep 14 15:39:39 2016 -0700 ---------------------------------------------------------------------- .../0.12.0.2.0/package/scripts/hive_interactive.py | 8 ++++++++ .../python/stacks/2.5/HIVE/test_hive_server_int.py | 17 ++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/7594857e/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py index 74c67fc..0739c93 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py @@ -59,6 +59,14 @@ Sets up the configs, jdbc connection and tarball copy to HDFS for Hive Server In def hive_interactive(name=None): import params + # Create Hive User Dir + params.HdfsResource(params.hive_hdfs_user_dir, + type="directory", + action="create_on_execute", + owner=params.hive_user, + mode=params.hive_hdfs_user_mode + ) + # list of properties that should be excluded from the config # this approach is a compromise against adding a dedicated config # type for hive_server_interactive or needed config groups on a http://git-wip-us.apache.org/repos/asf/ambari/blob/7594857e/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py index b97c377..7477457 100644 --- a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py +++ b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py @@ -224,7 +224,22 @@ class TestHiveServerInteractive(RMFTestCase): self.assertNoMoreResources() - def assert_configure_default(self, no_tmp=False, default_fs_default='hdfs://c6401.ambari.apache.org:8020'): + def assert_configure_default(self, no_tmp=False, default_fs_default=u'hdfs://c6401.ambari.apache.org:8020'): + + self.assertResourceCalled('HdfsResource', '/user/hive', + immutable_paths = self.DEFAULT_IMMUTABLE_PATHS, + security_enabled = False, + hadoop_bin_dir = '/usr/hdp/current/hadoop-client/bin', + keytab = UnknownConfigurationMock(), + kinit_path_local = '/usr/bin/kinit', + user = 'hdfs', + dfs_type = '', + owner = 'hive', + hadoop_conf_dir = '/usr/hdp/current/hadoop-client/conf', + type = 'directory', + action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name='missing_principal', default_fs=default_fs_default, + mode = 0755, + ) self.assertResourceCalled('Directory', '/etc/hive2', mode=0755,