Caused by: MetaException(message:Hive Schema version 2.1.0 does not match metastore's schema version 1.2.0 Metastore is not upgraded or corrupt)_2

Caused by: MetaException(message:Hive Schema version 2.1.0 does not match metastore's schema version 1.2.0 Metastore is not upgraded or corrupt)

[Dev root @ sd-9c1f-2eac /usr/local/src/apache-hive-2.1.1-bin/scripts/metastore/upgrade/mysql]
# ls
001-HIVE-972.mysql.sql 027-HIVE-12819.mysql.sql hive-schema-2.0.0.mysql.sql
002-HIVE-1068.mysql.sql 028-HIVE-12821.mysql.sql hive-schema-2.1.0.mysql.sql
003-HIVE-675.mysql.sql 029-HIVE-12822.mysql.sql hive-txn-schema-0.13.0.mysql.sql
004-HIVE-1364.mysql.sql 030-HIVE-12823.mysql.sql hive-txn-schema-0.14.0.mysql.sql
005-HIVE-417.mysql.sql 031-HIVE-12831.mysql.sql hive-txn-schema-1.3.0.mysql.sql
006-HIVE-1823.mysql.sql 032-HIVE-12832.mysql.sql hive-txn-schema-2.0.0.mysql.sql
007-HIVE-78.mysql.sql 034-HIVE-13076.mysql.sql hive-txn-schema-2.1.0.mysql.sql
008-HIVE-2246.mysql.sql 035-HIVE-13395.mysql.sql README
009-HIVE-2215.mysql.sql 036-HIVE-13354.mysql.sql upgrade-0.10.0-to-0.11.0.mysql.sql
010-HIVE-3072.mysql.sql hive-schema-0.10.0.mysql.sql upgrade-0.11.0-to-0.12.0.mysql.sql
011-HIVE-3649.mysql.sql hive-schema-0.11.0.mysql.sql upgrade-0.12.0-to-0.13.0.mysql.sql
012-HIVE-1362.mysql.sql hive-schema-0.12.0.mysql.sql upgrade-0.13.0-to-0.14.0.mysql.sql
013-HIVE-3255.mysql.sql hive-schema-0.13.0.mysql.sql upgrade-0.14.0-to-1.1.0.mysql.sql
014-HIVE-3764.mysql.sql hive-schema-0.14.0.mysql.sql upgrade-0.5.0-to-0.6.0.mysql.sql
016-HIVE-6386.mysql.sql hive-schema-0.3.0.mysql.sql upgrade-0.6.0-to-0.7.0.mysql.sql
017-HIVE-6458.mysql.sql hive-schema-0.4.0.mysql.sql upgrade-0.7.0-to-0.8.0.mysql.sql
018-HIVE-6757.mysql.sql hive-schema-0.4.1.mysql.sql upgrade-0.8.0-to-0.9.0.mysql.sql
019-HIVE-7784.mysql.sql hive-schema-0.5.0.mysql.sql upgrade-0.9.0-to-0.10.0.mysql.sql
020-HIVE-9296.mysql.sql hive-schema-0.6.0.mysql.sql upgrade-1.1.0-to-1.2.0.mysql.sql
021-HIVE-7018.mysql.sql hive-schema-0.7.0.mysql.sql upgrade-1.2.0-to-1.3.0.mysql.sql
022-HIVE-11970.mysql.sql hive-schema-0.8.0.mysql.sql upgrade-1.2.0-to-2.0.0.mysql.sql
023-HIVE-12807.mysql.sql hive-schema-0.9.0.mysql.sql upgrade-2.0.0-to-2.1.0.mysql.sql
024-HIVE-12814.mysql.sql hive-schema-1.1.0.mysql.sql upgrade.order.mysql
025-HIVE-12816.mysql.sql hive-schema-1.2.0.mysql.sql
026-HIVE-12818.mysql.sql hive-schema-1.3.0.mysql.sql

-------------------------------------------------------------------------------------------------------------------------------------------------------------------

[Dev root @ sd-9c1f-2eac ~]

# mysqldump --opt --user=root --password hive>metastore_backup.sql;
Enter password:

-------------------------------------------------------------------------------------------------------------------------------------------------------------------

[Dev root @ sd-9c1f-2eac ~]
# mysqldump --skip-add-drop-table --no-data hive>hive-schema-2.1.0.mysql.sql --user=root --password

Enter password:

 

-------------------------------------------------------------------------------------------------------------------------------------------------------------------

% mysql --verbose --user=root --password
mysql> use hive;
Database changed
mysql> source upgrade-1.2.0-to-2.0.0.mysql.sql
mysql> source upgrade-2.0.0-to-2.1.0.mysql.sql

posted @ 2017-05-05 14:29  天天好心情啊  阅读(1969)  评论(0编辑  收藏  举报