我已经使用CDH4.1安装了配置单元 我想使用MySql进行hive Metastore,我编辑了hive-site.xml以配置mysql并启动了hive服务器和Metastore 当我试图在蜂巢中创建表时,它显示以下错误 FAILED:元数据错误:java.lang.RuntimeException:无法实例化org.apache.hadoop.hive.metastore.HiveMetaStoreClient FAILED:执行错误,从org.apache.hadoop.hive.ql.exec.DDLTask返回代码1 有人可以帮忙吗? 我尝试使用以下帖子FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
解决我的hive-site.xml如下
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:hive2://localhost:21050/;auth=noSasl</value>
<description>the URL of the MySQL database</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hive</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>Newuser123</value>
</property>
<property>
<name>datanucleus.autoCreateSchema</name>
<value>false</value>
</property>
<property>
<name>datanucleus.fixedDatastore</name>
<value>true</value>
</property>
<property>
<name>hive.metastore.uris</name>
<value>thrift://localhost:9083</value>
<description>IP address (or fully-qualified domain name) and port of the metastore host</description>
</property>
答案 0 :(得分:0)
一个可能的原因是 连接到Hive的数据库(MySql)尚未启动。 开始:
/etc/init.d/mysqld start