我已安装 hadoop
, hive
以及 MySQL
在中的同一服务器上 CENT OS
. 我还设置了 MySQL
用户id-hive可以通过以下步骤访问数据库。
mysql> CREATE DATABASE metastore;
mysql> USE metastore;
mysql> SOURCE $HIVE_HOME/scripts/metastore/upgrade/mysql/hive-schema-0.10.0.mysql.sql;
mysql> CREATE USER 'hiveuser'@'%' IDENTIFIED BY 'hivepassword';
mysql> GRANT all on *.* to 'hiveuser'@localhost identified by 'hivepassword';
mysql> flush privileges;
my hive-site.xml文件属性如下:
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost/metastorecreateDatabaseIfNotExist=true</value>
<description>metadata is stored in a MySQL server</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
<description>MySQL JDBC driver class</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hiveuser</value>
<description>user name for connecting to mysql server</description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>hivepassword</value>
<description>password for connecting to mysql server</description>
</property>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/user/hive/warehouse</value>
<description> warehouse </description>
</property>
当我在 hive shell
我得到以下错误:
配置单元>显示表格;失败:元数据错误:java.lang.runtimeexception:无法示例化org.apache.hadoop.hive.metastore.hivemetastoreclient失败:执行错误,从org.apache.hadoop.hive.ql.exec.ddltask返回代码1
我在网上搜了所有的东西,但找不到解决我问题的办法。有人能指引我吗,我在这里错过了什么?
1条答案
按热度按时间6uxekuva1#