ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hurley" <jhur...@hortonworks.com>
Subject Review Request 40711: Hive Metastore Downgrade Fails Because Of upgradeSchema Invocation
Date Wed, 25 Nov 2015 17:29:15 GMT

-----------------------------------------------------------
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 <module>
    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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message