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 3964A18D54 for ; Mon, 13 Jul 2015 09:57:02 +0000 (UTC) Received: (qmail 25688 invoked by uid 500); 13 Jul 2015 09:57:02 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 25660 invoked by uid 500); 13 Jul 2015 09:57:02 -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 25651 invoked by uid 99); 13 Jul 2015 09:57:02 -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, 13 Jul 2015 09:57:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F3DA1E0009; Mon, 13 Jul 2015 09:57:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dmitriusan@apache.org To: commits@ambari.apache.org Date: Mon, 13 Jul 2015 09:57:01 -0000 Message-Id: <5a4382fc38c549eaa6c0c3f794090a12@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] ambari git commit: AMBARI-12391. Rolling upgrade failed on Hive restart for Centos 7 (dlysnichenko) Repository: ambari Updated Branches: refs/heads/branch-2.1 f28c2493e -> e2b2eb349 refs/heads/trunk 99c5ab336 -> 871b1aaa8 AMBARI-12391. Rolling upgrade failed on Hive restart for Centos 7 (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e2b2eb34 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e2b2eb34 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e2b2eb34 Branch: refs/heads/branch-2.1 Commit: e2b2eb3499793e0f4f5a27db93de8d7ae39c8e20 Parents: f28c249 Author: Lisnichenko Dmitro Authored: Mon Jul 13 12:51:16 2015 +0300 Committer: Lisnichenko Dmitro Committed: Mon Jul 13 12:51:16 2015 +0300 ---------------------------------------------------------------------- .../HIVE/0.12.0.2.0/package/scripts/hive_metastore.py | 5 +++++ .../src/test/python/stacks/2.1/HIVE/test_hive_metastore.py | 4 ++++ 2 files changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e2b2eb34/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py index a17ea4f..1a6c6c1 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py @@ -32,6 +32,7 @@ from resource_management.libraries.functions.security_commons import cached_kini from resource_management.libraries.functions.security_commons import get_params_from_filesystem from resource_management.libraries.functions.security_commons import validate_security_config_properties from resource_management.libraries.functions.security_commons import FILE_TYPE_XML +from resource_management.core.resources.system import File from hive import hive from hive import jdbc_connector @@ -178,6 +179,10 @@ class HiveMetastoreDefault(HiveMetastore): Execute(('cp', params.target, target_directory), path=["/bin", "/usr/bin/"], sudo = True) + File(os.path.join(target_directory, os.path.basename(params.target)), + mode = 0644, + ) + # build the schema tool command binary = format("/usr/hdp/{version}/hive/bin/schematool") http://git-wip-us.apache.org/repos/asf/ambari/blob/e2b2eb34/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py b/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py index dc1933b..fab9e54 100644 --- a/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py +++ b/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py @@ -577,6 +577,10 @@ class TestHiveMetastore(RMFTestCase): ('cp', '/usr/hdp/current/hive-server2/lib/mysql-connector-java.jar', '/usr/hdp/2.3.0.0-1234/hive/lib'), path = ['/bin', '/usr/bin/'], sudo = True) + self.assertResourceCalled('File', '/usr/hdp/2.3.0.0-1234/hive/lib/mysql-connector-java.jar', + mode = 0644, + ) + self.assertResourceCalled('Execute', "/usr/hdp/2.3.0.0-1234/hive/bin/schematool -dbType mysql -upgradeSchema", logoutput = True, environment = {'HIVE_CONF_DIR': '/usr/hdp/current/hive-server2/conf/conf.server'}, tries = 1, user = 'hive')