1

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

以下内容已添加到第二个hive 实例的 hive-conf.xml 中:注意 db 名称为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-specific属性:

<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"

还需要哪些额外步骤?

4

0 回答 0