使用非默认的hive Metastore数据库名称

时间:2015-03-24 00:05:15

标签: hive metastore

一台机器上有两个版本的配置单元。目的是通过单个mysql实例支持两者。为此,我们需要使用与 Metastore

不同的数据库名称

以下内容已添加到第二个配置单元实例的hive-conf.xml中:请注意数据库名称为 metastore14 ,并且 createDatabaseIfNotExist 设置为true:

<configuration>
<property>
  <name>javax.jdo.option.ConnectionURL</name>
  <value>jdbc:mysql://localhost/metastore14?createDatabaseIfNotExist=true</value>
  <description>the URL of the MySQL database</description>
</property>

此外,我们设置了相应的datanucleus特定属性:

<property>
  <name>datanucleus.autoCreateSchema</name>
  <value>true</value>
</property>

还正确设置了HIVE_CONF_DIR:

17:08:28/libexec $echo $HIVE_CONF_DIR
/usr/local/Cellar/hive/0.14.0/libexec/conf

但是,从hive客户端连接到hive14时会发生以下错误:

Logging initialized using configuration in jar:file:/usr/local/Cellar/hive/0.14.0/libexec/lib/hive-common-0.14.0.jar!/hive-log4j.properties

-- run create table statement and get following error:

Caused by: org.datanucleus.store.rdbms.exceptions.MissingTableException: 
Required table missing : "`VERSION`" in Catalog "" Schema "". DataNucleus
requires this table to perform its persistence operations. Either your 
MetaData is incorrect, or you need to enable "datanucleus.autoCreateTables"

还需要哪些其他步骤?

0 个答案:

没有答案