当前位置: 首页 > 知识库问答 >
问题:

配置单元2.3.3元异常(消息:在元存储中找不到版本信息。)

蔚琦
2023-03-14

我有Hive 2.3.3和Hadoop 3.1.0。我可以在终端上使用hive comand启动Hive,但当我尝试创建表时,我收到以下错误:

    user$ hive
readlink: illegal option -- f
usage: readlink [-n] [file ...]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/caiocesare/Desktop/hive/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/caiocesare/Desktop/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]

Logging initialized using configuration in jar:file:/Users/caiocesare/Desktop/hive/lib/hive-common-2.3.3.jar!/hive-log4j2.properties Async: true
Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
hive> CREATE TABLE pokes (foo INT, bar STRING);
FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
hive> 

如果我启动hive--service metastore,下面的代码就是发布的错误:

user$ hive --service metastore
  readlink: 
  illegal option -- f
  usage: readlink [-n] [file ...]
2018-05-08 11:20:50: Starting Hive Metastore Server
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/caiocesare/Desktop/hive/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/caiocesare/Desktop/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
MetaException(message:Version information not found in metastore. )
    at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:83)
    at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:92)
    at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:6887)
    at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:6882)
    at org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:7140)
    at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:7067)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.util.RunJar.run(RunJar.java:308)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:222)
Caused by: MetaException(message:Version information not found in metastore. )
    at org.apache.hadoop.hive.metastore.ObjectStore.checkSchema(ObjectStore.java:7564)
    at org.apache.hadoop.hive.metastore.ObjectStore.verifySchema(ObjectStore.java:7542)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:101)
    at com.sun.proxy.$Proxy23.verifySchema(Unknown Source)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMSForConf(HiveMetaStore.java:591)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:584)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:651)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:427)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148)
    at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107)
    at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:79)
    ... 11 more
Exception in thread "main" MetaException(message:Version information not found in metastore. )
    at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:83)
    at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:92)
    at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:6887)
    at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:6882)
    at org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:7140)
    at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:7067)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.util.RunJar.run(RunJar.java:308)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:222)
Caused by: MetaException(message:Version information not found in metastore. )
    at org.apache.hadoop.hive.metastore.ObjectStore.checkSchema(ObjectStore.java:7564)
    at org.apache.hadoop.hive.metastore.ObjectStore.verifySchema(ObjectStore.java:7542)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:101)
    at com.sun.proxy.$Proxy23.verifySchema(Unknown Source)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMSForConf(HiveMetaStore.java:591)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:584)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:651)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:427)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148)
    at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107)
    at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:79)
    ... 11 more

我所做的唯一修改,遵循我的大学教师指南,是删除hive-jdbc-1.0.0-standalone.jar并创建 /tmp和 /user/hive/warehouse.有人可以帮助我使用hive吗?

共有1个答案

海宁
2023-03-14

我自己找到了一个解决方案。我会发布它:按照下面链接上的命令。Hive模式工具

之后,当您尝试打开配置单元时,会收到一个错误,如:metastore使用不同的schematool版本。为此,我使用了以下步骤,并根据您的需求修改MySql数据库:

Before you run hive for the first time, run

schematool -initSchema -dbType derby
If you already ran hive and then tried to initSchema and it's failing:

mv metastore_db metastore_db.tmp
Re run

schematool -initSchema -dbType derby
Run hive again

此外,如果您更改目录,将找不到上面创建的metastore_db。它对我有用。

 类似资料:
  • 我在Ubuntu 16.04上运行Hadoop 2.7.3、MySQL 5.7.17和Hive 2.1.1。 当我运行/hive时,我不断收到以下警告和异常: 这是我的hive-site.xml 为了修复错误,我尝试了Hive无法实例化org.apache.hadoop.Hive.ql.metadata。SessionHiveMetaStoreClient,无法实例化org.apache.hado

  • 我们正试图在Linux服务器上启动hive元存储,但我们面临一个问题。如果我们尝试使用以下命令启动配置单元元存储服务: sudo hive服务转移 我们会遇到很多这样的错误: 原因:java.sql。SQLException:拒绝用户“hive”@“sandbox.hortonworks的访问。com“(使用密码:YES)在com.mysql.jdbc.SQLError.createSQLExce

  • 问题内容: 我在Ubuntu 16.04上运行Hadoop 2.7.3,MySQL 5.7.17和Hive 2.1.1。 当我运行./hive时,我不断收到以下警告和异常: 这是我的hive-site.xml 为了解决该错误,我尝试了Hive无法实例化org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient和无法实例化org.apa

  • 网页 在蟒蛇中: 错误: selenium . common . exceptions . elementclickinterceptedexception:Message:Element click intercepted:Element。..在点(1400,38)是不可点击的。其他元素将接收点击:

  • 正如我所知,hive支持sql就像Multi-Select中的一个一样,我的sql是这样的: 我尝试一个查询多选择,但配置单元返回异常:“编译语句时出错:failed:SemanticException Exception在处理时异常” 有人知道为什么会这样吗?如何解决?谢谢,高尔。

  • 问题内容: 我正在尝试使用selenium在kahoot.it网页上自动生成大量用户,以使它们出现在类的前面,但是,当我尝试访问inputSession项时(在其中写入gameID进入游戏) 这是错误: 任何帮助将非常感激!:) 问题答案: 可能是竞标条件,在该竞标条件下find元素在页面上出现之前就已执行。看一下等待超时文档。这是文档中的示例