当前位置:   article > 正文

启动hive时报错:Required table missing : “`VERSION`“ in Catalog ““ Schema ““._required table missing : "`version`" in catalog ""

required table missing : "`version`" in catalog "" schema "". datanucleus re

一、问题描述

成功安装hive后,在启动时出现报错:

org.datanucleus.store.rdbms.exceptions.MissingTableException: Required table missing : "`VERSION`" in Catalog "" Schema "". DataNucleus requires this table to perform its persistence operations.

二、解决方案

先退出hive:

exit;

进入hive安装目录(本人的hive安装在/usr/local/hive):

cd /usr/local/hive

执行如下命令:

./bin/schematool -dbType mysql -initSchema

看到如下内容即代表初始化完毕:

初始化后再次启动hive,可以看到成功启动:

至此,问题成功解决!!!

三、错误分析

这个错误表明 DataNucleus 在执行持久化操作时需要一个名为 "VERSION" 的表,但在数据库中找不到该表。

解决这个问题的一种方法是使用 Hive 提供的 schematool 命令来初始化数据库模式。

执行 ./bin/schematool -dbType mysql -initSchema 命令会调用 Hive 的 schematool 工具,并使用 MySQL 数据库类型来初始化数据库模式。这个命令将创建所需的表格以支持 Hive 的运行。

在执行命令之前,请确保已经正确地配置了 Hive 和 MySQL,并且已经启动了 MySQL 服务器。这个命令将会使用 Hive 的默认配置文件中指定的数据库连接信息来连接到 MySQL 数据库并执行初始化操作。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/719362
推荐阅读
相关标签
  

闽ICP备14008679号