hive 设置的坑

来源:互联网 发布:网络最短路径 编辑:程序博客网 时间:2024/05/28 05:18

集成mysql,运行hive。

出现:

 

FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask


打开调试模式:

hive -hiveconf hive.root.logger=DEBUG,console

发现是hive的mysql用户被deny了。

grant all privileges on *.* to  'hive'@'localhost' ; flush privileges

发现还是不行, 用户始终被deny,提示hive@localhost被deny。

最后修改hive-site.xml

 

<property>  <name>javax.jdo.option.ConnectionURL</name>  <value>jdbc:mysql://192.168.205.101:3306/hive?createDatabaseIfNotExist=true</value>  <description>JDBC connect string for a JDBC metastore</description></property>


好了。