最近需要提取一些数据,故开始使用hive,本机搭建了一个hive客户端环境,但是始终有问题,在本机装好了mysql以后,老是报
Caused by: org.datanucleus.store.rdbms.exceptions.MissingTableException: Required table missing : "`DBS`" in Catalog "" Schema "". DataNucleus requires this table to perform its persistence operations. Either your MetaData is incorrect, or you need to enable "datanucleus.autoCreateTables"
at org.datanucleus.store.rdbms.table.AbstractTable.exists(AbstractTable.java:455)
at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.performTablesValidation(RDBMSStoreManager.java:2689)
at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.addClassTablesAndValidate(RDBMSStoreManager.java:2503)
at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2148)
at org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:113)
at org.datanucleus.store.rdbms.RDBMSStoreManager.addClasses(RDBMSStoreManager.java:986)
at org.datanucleus.store.rdbms.RDBMSStoreManager.addClasses(RDBMSStoreManager.java:952)
at org.datanucleus.store.AbstractStoreManager.addClass(AbstractStoreManager.java:919)
at org.datanucleus.store.mapped.MappedStoreManager.getDatastoreClass(MappedStoreManager.java:356)
at org.datanucleus.store.rdbms.query.legacy.ExtentHelper.getExtent(ExtentHelper.java:48)
at org.datanucleus.store.rdbms.RDBMSStoreManager.getExtent(RDBMSStoreManager.java:1332)
at org.datanucleus.ObjectManagerImpl.getExtent(ObjectManagerImpl.java:4149)
依据堆栈提示,然后下得jar文件主要是看 AbstractTable.exists(AbstractTable.java:455)
if ((type == null) || ((allowDDLOutput()) && (this.storeMgr.getDdlWriter() != null) && (this.storeMgr.getCompleteDDL())))
{
if (!auto_create)
{
this.existsInDatastore = Boolean.FALSE;
throw new MissingTableException(getCatalogName(), getSchemaName(), toString());
}
455 行 便是 异常抛出之地。
依据 hive错误提示
"datanucleus.autoCreateTables" = true
配置了hive-site.xml不行,故结合上面的代码看,猜测是autoCreate没有传递进去,故开始跟踪这个值的设置的地方,最终跟踪到org.datanucleus.store.mapped.MappedStoreManager,其中有一段很关键的代码如下
if ((this.readOnlyDatastore) || (this.fixedDatastore))
{
this.autoCreateTables = false;
this.autoCreateColumns = false;
this.autoCreateConstraints = false;
}
else
{
boolean autoCreateSchema = conf.getBooleanProperty("datanucleus.autoCreateSchema");
if (autoCreateSchema)
{
this.autoCreateTables = true;
this.autoCreateColumns = true;
this.autoCreateConstraints = true;
}
else
{
this.autoCreateColumns = conf.getBooleanProperty("datanucleus.autoCreateColumns");
this.autoCreateTables = conf.getBooleanProperty("datanucleus.autoCreateTables");
this.autoCreateConstraints = conf.getBooleanProperty("datanucleus.autoCreateConstraints");
}
}
看来关键是 this.readOnlyDatastore this.fixedDatastore 这2个字段
而且autoCreateSchema 这个设置为true 就可以决定了其他的设置,所以其他设置在此都无效了。
继续追踪org.datanucleus.store.AbstractStoreManager 发现了这2个字段的设置代码
this.readOnlyDatastore = conf.getBooleanProperty("datanucleus.readOnlyDatastore");
this.fixedDatastore = conf.getBooleanProperty("datanucleus.fixedDatastore");
原来问题再这里,再次修改hive-site.xml文件,ok,错误没有了。
分享到:
相关推荐
hive 开发UDF 使用maven工程 引发jar包缺失 hive 开发UDF 使用maven工程 引发jar包缺失
DBeaver链接hive驱动包下载: hive-jdbc-uber-2.6.5.0-292.jar
1 Hive 概念与连接使用: 2 2 Hive支持的数据类型: 2 2.1原子数据类型: 2 2.2复杂数据类型: 2 2.3 Hive类型转换: 3 3 Hive创建/删除数据库 3 3.1创建数据库: 3 3.2 删除数据库: 3 4 Hive 表相关语句 3 4.1 Hive ...
This book is your go-to resource for using Hive: authors Scott Shaw, Ankur Gupta, David Kjerrumgaard, and Andreas Francois Vermeulen take you through learning HiveQL, the SQL-like language specific ...
Hive allows you to take data in Hadoop, apply a fixed external schema, and query the data with an SQL-like language. With Hive, complex queries can yield simpler, more effectively visualized results. ...
hive-json-schema最新源代码hive-json-schema最新源代码hive-json-schema最新源代码hive-json-schema最新源代码hive-json-schema最新源代码hive-json-schema最新源代码hive-json-schema最新源代码hive-json-schema...
Hive JDBC连接示例该项目展示了如何使用各种不同的方法连接到Hiveserver2。 所有类仅适用于Hiveserver2。 正在使用Cloudera JDBC驱动程序,可以从下载。 在撰写本文时,最新版本为v2.5.15 。要求: 您需要下载驱动...
问题 解决方案 在hadoop的配置文件core-site.xml增加如下配置: hadoop.proxyuser.hc.hosts * hadoop.proxyuser.hc.groups * 其中“hc”是连接beeline的用户。...重启hdfs:先stop-all.sh,再start-all.sh,否则...
大数据安全-kerberos技术-hive安装包,hive版本:apache-hive-3.1.3-bin.tar.gz
hive的一些报错及解决方法:连接报错、执行脚本卡住、内存溢出报错、表死锁问题
Table or view 'stu' not found in database 'default'; 分析:确实没有临时表View,并且没有开启Hive支持 解决:开启Hive支持 val spark: SparkSession = SparkSession.builder() .appName(SparkUtils) .master...
libmaxminddb Ruby 绑定安装安装 ,然后: gem install hive_geoip2用法 Hive :: GeoIP2 . lookup ( '88.174.0.1' , 'GeoLite2-City.mmdb' ) 或者 mmdb = Hive :: GeoIP2 . new ( 'GeoLite2-City.mmdb' )mmdb . ...
D:\Documents\Desktop\CRM项目\CRM任务调度\ods层\增量抽取\从MySQL中按天增量抽取hive中,D:\Documents\Desktop\CRM项目\CRM任务调度\ods层\增量抽取\从MySQL中按天增量抽取hive中,D:\Documents\Desktop\CRM项目\CRM...
包含video user数据
HIVE-3Dprinters:关于HIVE 3d打印机的操作和维护的一般信息
java代码执行hive相关ktr时报错: database type with plugin id [HIVE2] couldn't be found! 解决:kettle-core-7.1.0.0-12.jar适配hive后的包。具体步骤请查看...
其实在网上搜一下,连接hive的工具还有很多,使用DBeaver的原因是因为我之前连接关系型数据库使用的就是DBeaver,正好DBeaver支持连接hive,且个人认为DBeaver确实挺好用的,支持各种关系型数据库,如连接Oracle...
Hive 大数据技术原理与实践 Hive 是建立在 Hadoop 之上的数据仓库基础架构,提供了一系列工具,可以用来进行数据提取、转换、加载。这是一种可以存储、查询和分析存储在 Hadoop 中的大规模数据的机制。Hive 使用 ...
hive 基本操作的命令和hive 实用命令等,有利与学习hive和mysql
P1-Hive游戏 这是获奖游戏Hive的简化的计算机版本。 游戏的目的是使用以独特方式移动的生物块包围对手的女王蜂。 关于游戏 游戏是两个人一起玩的。 每个玩家有7个六边形的碎片,上面有以下生物:1只蜂王,2只甲虫,2...