本文介绍了在创建表蜂巢例外呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了蜂巢,但是当我写命令创建表CREATE TABLE美孚(ID INT,味精STRING);。我抛出异常清理行动已完成
失败:错误元数据:javax.jdo.JDOFatalDataStoreException:无法创建数据库'metastore_db,请参阅details.NestedThrowables下一个异常:java.sql.SQLException中:无法创建数据库'metastore_db,详情请参阅下一个异常。失败:。执行错误,从org.apache.hadoop.hive.ql.exec.DDLTask回报code 1为什么这个异常是发生,要么是配置问题还是其他什么东西。

i have installed Hive, but when i write command to create table "CREATE TABLE foo(id int, msg STRING);". I throws Exception "Cleanup action completedFAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Failed to create database 'metastore_db', see the next exception for details.NestedThrowables:java.sql.SQLException: Failed to create database 'metastore_db', see the next exception for details.FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask". Why this exception is occur, either it is configuration problem or something else.

推荐答案

我有同样的问题:

voicestreams @ voicestreams:〜/测试台/ eclipseprojects /工作区/ MA preducesort / JAVA $蜂巢

voicestreams@voicestreams:~/testbed/eclipseprojects/workspace/mapreducesort/java$ hive

蜂巢历史文件=的/ tmp /根/ hive_job_log_root_201210282200_1123208966.txt

Hive history file=/tmp/root/hive_job_log_root_201210282200_1123208966.txt

蜂巢>节目表

失败:错误元数据:javax.jdo.JDOFatalDataStoreException:无法创建数据库'的/ var / lib中/蜂巢/ metastore / metastore_db',详情请参阅下一个异常。
  NestedThrowables:
  值java.sql.SQLException:无法创建数据库'的/ var / lib中/蜂巢/ metastore / metastore_db',详情请参阅下一个异常。
  失败:执行错误,返回code 1从org.apache.hadoop.hive.ql.exec.DDLTask

我已经安装使用蜂巢的apt-get安装Hadoop的蜂巢。
它的工作后,我来到在/ var / lib中/蜂巢/的metastore。我这样做编辑:
/etc/hive/conf.dist/hive-site.xml

I had installed Hive using apt-get install hadoop-hive.It worked after i moved the metastore from /var/lib/hive/. I did that by editing:/etc/hive/conf.dist/hive-site.xml

从:

<property>
  <name>javax.jdo.option.ConnectionURL</name>
  <value>jdbc:derby:;databaseName=/var/lib/hive/metastore/metastore_db;create=true</value>
  <description>JDBC connect string for a JDBC metastore</description>
</property>

<property>
<name>javax.jdo.option.ConnectionURL</name>
  <value>jdbc:derby:;databaseName=/home/voicestreams/hive/metastore/metastore_db;create=true</value>
  <description>JDBC connect string for a JDBC metastore</description>
</property>

`

基本上,我改变中的databaseName =可写目录(/ home / voicestreams /蜂巢/)和它的工作。当然,我必须要创建/家庭/ voicestreams /蜂巢/运行前蜂巢again.Hope这会有所帮助。

Basically, i changed the databaseName= to a writable directory (/home/voicestreams/hive/) and it worked. Of course, i had to create /home/voicestreams/hive/ before running hive again.Hope this helps.

这篇关于在创建表蜂巢例外呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 16:20