Get the App
SLTechnology News&Howtos  ›  Servers  › 

What if you start the hive command and report an error "Metastore contains multiple versions"?

Shulou Source: shulou.com Published: 2022-06-01 02:53:45 09月19日 Update

This article mainly shows you the "start hive command error" Metastore contains multiple versions "how to do", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "start hive command error" Metastore contains multiple versions "how to do" this article.

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 (NativeMethod) 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. (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 (NativeMethod) 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. (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. (HiveMetaStoreClient.java:178) at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient. (SessionHiveMetaStoreClient.java:73). 18 more123456789101112131415161718192021222324252627282930313233343536373839404142434445 solution:

Because hive metastore is stored in mysql, log in to the DB used by mysql,use hive, and then query the following VERSION table

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 |

+-- +

Keep the first record and delete all other records

Delete from VERSION where VER_ID! = 1 1 causes this kind of abnormal problem

Hive does not support concurrency. It is estimated that my colleague accidentally started multiple hive. It may also be a network problem. Anyway, it is very weird.

The above is all the contents of the article "start the hive command to report an error" Metastore contains multiple versions "what to do". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Commands what to do content articles questions learning help weird reasons colleagues multiple solutions logs easy to understand more organization knowledge editing networking industry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux vpn Microsoft Apple Huawei