获取 MissingTableException:在 mysql 上启动 hive Metastore 时所需的表缺少​​ VERSION

jav*_*dba 2 mysql hive

当元数据存储停止工作时,使用 mysql 配置单元:

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"
Run Code Online (Sandbox Code Playgroud)

设置 autoCreateTables 也不起作用:

<property>
<name>datanucleus.autoCreateTables</name>
<value>True</value>
</property>
Run Code Online (Sandbox Code Playgroud)

那么如何解决这个问题呢?

jav*_*dba 6

转到 $HIVE_HOME 并在 schematool 上运行 initschema 选项:

bin/schematool -dbType mysql -initSchema
Run Code Online (Sandbox Code Playgroud)

  • 这对我有用——使用 derby 而不是 mysql:bin/schematool -dbType derby -initSchema (2认同)