启动hive命令报错 “Metastore contains multiple versions”
2015-09-02 14:41
483 查看
错误日志:
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:444) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:672) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:616) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.util.RunJar.run(RunJar.java:221) at org.apache.hadoop.util.RunJar.main(RunJar.java:136) Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1449) at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:63) at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:73) at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2661) at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2680) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:425) ... 8 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1447) ... 13 more Caused by: MetaException(message:Metastore contains multiple versions) at org.apache.hadoop.hive.metastore.ObjectStore.getMSchemaVersion(ObjectStore.java:6643) at org.apache.hadoop.hive.metastore.ObjectStore.getMetaStoreSchemaVersion(ObjectStore.java:6605) at org.apache.hadoop.hive.metastore.ObjectStore.checkSchema(ObjectStore.java:6564) at org.apache.hadoop.hive.metastore.ObjectStore.verifySchema(ObjectStore.java:6552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:98) at com.sun.proxy.$Proxy5.verifySchema(Unknown Source) at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:539) at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:587) at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:429) at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:66) at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:72) at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:5554) at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:178) at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:73) ... 18 more
解决方案:
因为hive metastore存储在mysql中,所以登录mysql,use hive所使用的DB,然后 查询下VERSION表mysql> select * from VERSION;
+——–+—————-+——————+
| VER_ID | SCHEMA_VERSION | VERSION_COMMENT |
+——–+—————-+——————+
| 1 | 0.14.0 | Set by MetaStore |
| 2 | 0.14.0 | Set by MetaStore |
| 3 | 0.14.0 | Set by MetaStore |
| 4 | 0.14.0 | Set by MetaStore |
| 5 | 0.14.0 | Set by MetaStore |
| 6 | 0.14.0 | Set by MetaStore |
+——–+—————-+——————+
保留第一条记录,其他记录全部删除
delete from VERSION where VER_ID !=1
出现这类异常问题原因
hive 是不支持并发的,估计我同事 不小心启动多个hive,也可能是网络问题,反正很诡异相关文章推荐
- 启动hive命令报错 “Metastore contains multiple versions”
- 文件结构体struct file(Linux 2.6.23内核) (转) http://blog.csdn.net/wangchaoxjtuse/article/details/6036684
- LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
- myslq修复表 is marked as crashed and should be repaired
- Roundcubemail简单安装配置
- 多线程调用epoll_wait()的线程安全问题分析 http://blog.csdn.net/lmh12506/article/details/7836827
- POJ 3735 Training little cats(矩阵快速幂)
- STL学习笔记之traits技术
- Smail 注入遇到的问题以及System.out
- A Presentation of the STL Vector Container
- 判断包含字符String.contains
- UVA 11374 Airport Express (最短路)
- RAID入门一页通,最全的RAID技术、原理图解
- hdu5319 Painter(模拟)
- HDU1239 Calling Extraterrestrial Intelligence Again (打表+暴力)
- [Leetcode]#219 Contains Duplicate II
- [Leetcode]#217 Contains Duplicate
- [Leetcode172]Factorial Trailing Zeroes
- Container With Most Water
- How to Use updateConstraints(什么时候该使用updateConstraints)