hive安装遇到的错误

第一种:

Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
解决:网上说是hadoop和hive的guava.jar版本不一致。

具体可参考文章:

Hive初始化报错Exception in thread “main“ java.lang.NoSuchMethodError: com.google.common.base._故明所以的博客-CSDN博客

第二种:

Exception in thread "main" java.lang.RuntimeException: java.net.ConnectException: Call From xxxx-VirtualBox/127.0.1.1 to localhost:9000 failed on connection exception: java.net.ConnectException: 拒绝连接; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
解决:Hadoop没有启动 启动之后就可以了,但我又出现了另一种错误,哭死。

第三种:

Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create directory /tmp/hive. Name node is in safe mode.

 解决:关闭Hadoop安全模式,虽然我的默认关闭,但我还是重新运行下面的代码,可以进入hive,但是还是有错误,太难了明天再弄。

hadoop dfsadmin -safemode get


第四种:

Required table missing : "VERSION" in Catalog "" Schema "". DataNucleus requires this table to perform its persistence operations. Either your MetaData is incorrect, or you need to enable "datanucleus.schema.autoCreateTables"
org.datanucleus.store.rdbms.exceptions.MissingTableException: Required table missing : "VERSION" in Catalog "" Schema "". DataNucleus requires this table to perform its persistence operations. Either your MetaData is incorrect, or you need to enable "datanucleus.schema.autoCreateTables"
    at org.datanucleus.store.rdbms.table.Abs

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

这个错误忘记是怎么解决得了,后面通过元数据初始化命令发现是自己jdbc驱动没有查找,但是我有按照教程放在lib目录下,后面换了jdbc驱动的版本就可以了。

初始化元数据命令:

schematool -dbType mysql -initSchema --verbose

------------------------------------------------------分割线------------------------------------------------------------------

现在hive终于部署好了,太不容易了。要细心一点,对教程要理解,加上自己的思考,才能知其所以然。

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值