启动hive命令报错 “Metastore contains multiple versions”
解决方案:
因为hive metastore存储在mysql中,所以登录mysql,use hive所使用的DB,然后 查询下VERSION表
1 mysql> select * from VERSION; 2 3 +——–+—————-+——————+ 4 | VER_ID | SCHEMA_VERSION | VERSION_COMMENT | 5 +——–+—————-+——————+ 6 | 1 | 0.14.0 | Set by MetaStore | 7 | 2 | 0.14.0 | Set by MetaStore | 8 | 3 | 0.14.0 | Set by MetaStore | 9 | 4 | 0.14.0 | Set by MetaStore | 10 | 5 | 0.14.0 | Set by MetaStore | 11 | 6 | 0.14.0 | Set by MetaStore | 12 +——–+—————-+——————+
保留第一条记录,其他记录全部删除
delete from VERSION where VER_ID !=1
版权声明:本文为博主原创文章,未经博主允许不得转载。