Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 31B9318D43 for ; Wed, 25 Nov 2015 17:29:18 +0000 (UTC) Received: (qmail 93624 invoked by uid 500); 25 Nov 2015 17:29:18 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 93588 invoked by uid 500); 25 Nov 2015 17:29:18 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 93571 invoked by uid 99); 25 Nov 2015 17:29:17 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Nov 2015 17:29:17 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id F112D2E447C; Wed, 25 Nov 2015 17:29:15 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============2301332742688131309==" MIME-Version: 1.0 Subject: Review Request 40711: Hive Metastore Downgrade Fails Because Of upgradeSchema Invocation From: "Jonathan Hurley" To: "Alejandro Fernandez" , "Swapan Shridhar" , "Nate Cole" Cc: "Ambari" , "Jonathan Hurley" Date: Wed, 25 Nov 2015 17:29:15 -0000 Message-ID: <20151125172915.24387.80506@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Jonathan Hurley" X-ReviewGroup: Ambari X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/40711/ X-Sender: "Jonathan Hurley" Reply-To: "Jonathan Hurley" X-ReviewRequest-Repository: ambari --===============2301332742688131309== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/40711/ ----------------------------------------------------------- Review request for Ambari, Alejandro Fernandez, Nate Cole, and Swapan Shridhar. Bugs: AMBARI-14073 https://issues.apache.org/jira/browse/AMBARI-14073 Repository: ambari Description ------- When downgrading Hive Metastore on a rolling upgrade, the upgradeSchema function is invoked when it should not be. {code} Traceback (most recent call last): File \"/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py\", line 239, in HiveMetastore().execute() File \"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py\", line 218, in execute method(env) File \"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py\", line 497, in restart self.pre_upgrade_restart(env, upgrade_type=upgrade_type) File \"/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py\", line 112, in pre_upgrade_restart self.upgrade_schema(env) File \"/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py\", line 235, in upgrade_schema Execute(command, user=params.hive_user, tries=1, environment=env_dict, logoutput=True) File \"/usr/lib/python2.6/site-packages/resource_management/core/base.py\", line 154, in __init__ self.env.run() File \"/usr/lib/python2.6/site-packages/resource_management/core/environment.py\", line 158, in run self.run_action(resource, action) File \"/usr/lib/python2.6/site-packages/resource_management/core/environment.py\", line 121, in run_action provider_action() File \"/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py\", line 238, in action_run tries=self.resource.tries, try_sleep=self.resource.try_sleep) File \"/usr/lib/python2.6/site-packages/resource_management/core/shell.py\", line 70, in inner result = function(command, **kwargs) File \"/usr/lib/python2.6/site-packages/resource_management/core/shell.py\", line 92, in checked_call tries=tries, try_sleep=try_sleep) File \"/usr/lib/python2.6/site-packages/resource_management/core/shell.py\", line 140, in _call_wrapper result = _call(command, **kwargs_copy) File \"/usr/lib/python2.6/site-packages/resource_management/core/shell.py\", line 291, in _call raise Fail(err_msg) resource_management.core.exceptions.Fail: Execution of '/usr/hdp/2.2.8.0-3150/hive/bin/schematool -dbType mysql -upgradeSchema' returned 1. org.apache.hadoop.hive.metastore.HiveMetaException: Unknown version specified for upgrade 1.2.0 Metastore schema may be too old or newer *** schemaTool failed *** {code} Diffs ----- ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py 084494d ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py f2ddc80 ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py bdc0fe2 Diff: https://reviews.apache.org/r/40711/diff/ Testing ------- ---------------------------------------------------------------------- Total run:836 Total errors:0 Total failures:0 OK Thanks, Jonathan Hurley --===============2301332742688131309==--