Hive中查看数据库,查看表的时候报错

一、hive版本验证,FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

解决方法

简单粗暴:在hvie-site.xml中关闭版本验证

<property>
    <name>hive.metastore.schema.verification</name>
    <value>false</value>
</property>

目前这种方法只是强制性的关闭了hive的版本验证,现在的错是解决了;但是目前还不知道关闭版本验证之后会对后期有什么影响,如果有读者知道的话望 留言告知。谢谢!

二、FAILED: HiveException java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

解决:

1、先试着运行hive --service metastore,即手动开启metastore的会话。

有可能会报下面的异常:
……
Caused by: java.lang.RuntimeException: Driver org.apache.derby.jdbc.EmbeddedDriver claims to not accept jdbcUrl, jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true&characterEncoding=UTF8&useSSL=false
分析
这个异常表明JDBC驱动使用的derby的驱动,而连接URL则使用的mysql连接字符串。属性javax.jdo.option.ConnectionDriverName配置错了。
解决方法:
在hive-site.xml配置文件中修改javax.jdo.option.ConnectionDriverName配置,不能有空格及其他符号
总结
总之,报告这个错误很有可能是存储元数据的关系型数据库有问题,很可能是没有启动,或者连接配置错误。
注意:hive默认的日志路径为/tmp/root/hive.log,可以使用tail -F /tmp/root/hive.log来监控hive的运行。

三、Caused by: MetaException(message:Hive Schema version 2.1.0 does not match metastore’s schema version 1.2.0 Metastore is not upgraded or corrupt)_2

报错提示

Caused by: MetaException(message:Hive Schema version 2.1.0 does not match metastore’s schema version 1.2.0 Metastore is not upgraded or corrupt)_2

解决方法

简单粗暴:在hvie-site.xml中关闭版本验证

<property>
    <name>hive.metastore.schema.verification</name>
    <value>false</value>
</property>

目前这种方法只是强制性的关闭了hive的版本验证,现在的错是解决了;但是目前还不知道关闭版本验证之后会对后期有什么影响,如果有读者知道的话望 留言告知。谢谢!

四、Missing Hive Execution Jar: /usr/local/llx12/hive/lib/hive-exec-*. jar

hive指令启动hive报错

在这里插入图片描述

解決方法

在这里插入图片描述
把hive的conf中hive-env.sh中里面的这几个export都注释掉

五、Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions

报错详情:

WARNING: 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.
Error: org.apache.hive.service.cli.HiveSQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. Permission denied: user=anonymous, access=EXECUTE, inode="/tmp/hadoop-yarn/staging/anonymous/.staging/job_1575623179132_0002":root:supergroup:drwx------

在这里插入图片描述

解决方法 (在conf的hive-env.sh中将最后一行的 * 号去掉)

在这里插入图片描述

最后显示 最后结果

在这里插入图片描述

发布了67 篇原创文章 · 获赞 40 · 访问量 9939

猜你喜欢

转载自blog.csdn.net/qq_44472134/article/details/104356294