FAILED: HiveException java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.me
•
大数据
当hive-site.xml以及mysql等都配置好时,格式化元数据库进入hive,仍然报未格式化元数据库的错
hive> show databases; FAILED: HiveException java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.Sess hive> show databases;
第一种方法便是把元数据删除,重新格式化
drop database metastore;
schematool -initSchema -dbType mysql
第二种,便是上诉方法并未解决,看报错信息是metastore的原因
可能是metastore未启动,进hive下的bin目录下
./hive --service metastore &
一般可以解决,不能解决的可能没有用metastore服务,直接注释掉。
最后我有一种荒诞的猜想,就我本人而言可能是因为我每次进去之后第一个命令是show databases;我重来一遍加了启动命令
nohup hive --service metastore>/usr/local/hive/logs/metastore.log 2>&1 &
nohup hive --service hiveserver2>/usr/local/hive/logs/hive2.log 2>&1 &
成功了

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://net2asp.com/b44baebc9e.html
