標籤:for comment ase ges next index art one sql
第一步:【db升級 ,先看第二步】
cd到 hive的 metastore upgrade目錄
cd /usr/hdp/2.5.0.0-1245/hive/scripts/metastore/upgrade/mysql
source 曆史版本至升級版本的sql
第二步:
修改ambari hivemeta 連結的db ,重啟 。 重啟過程中有錯 處理方案如下 【下次建議直接執行第二步,懷疑ambari會幫忙執行db升級】
drop index PCS_STATS_IDX on part_col_stats;SET FOREIGN_KEY_CHECKS = 0;drop table txns;drop table txn_components;drop table completed_txn_components;drop table compaction_queue;drop table completed_compactions;drop table aux_table;drop table next_compaction_queue_id;drop table next_txn_id;drop table next_lock_id;drop table hive_locks;drop table write_set;delete from VERSION;SET FOREIGN_KEY_CHECKS = 1;drop index CONSTRAINTS_PARENT_TABLE_ID_INDEX on KEY_CONSTRAINTS;----下邊兒不用執行,只是操作過程中,有刪除表且有值得操作 ---next_txn_id next_lock_id next_txn_id next_compaction_queue_id has one value 1 VERSION; has valueVER_ID | SCHEMA_VERSION | VERSION_COMMENT |+--------+----------------+-------------------------------+| 1 | 1.2.1000 | Hive release version 1.2.1000
bigdata_ambari修改hiveserver_metastore連結庫(從0.14 升級到1.2.1 )