无法创建数据库,因为它已经存在,但是它不是T
我想使用命令创建Hive数据库:
create database sbx_products_diff
但是它失败了以下错误:
jdbc:hive2:// myhost>创建数据库SBX_PRODUCTS_DIFF;
信息:编译 命令(queryID = Hive_20220414115555555555555555555555555555555555551B7-40CA-8CEE-D1D4147C080E): 创建数据库SBX_PRODUCTS_DIFF信息:语义分析 完成的信息:返回Hive架构:schema(fieldschemas:null, 属性:null)信息:已完成的编译 命令(queryID = hive_2022041411555555555555555555555555555555555555551B7-40CA-8CEE-D1D4147C080E); 花费时间:0.003秒信息:执行 命令(queryID = Hive_20220414115555555555555555555555555555555555551B7-40CA-8CEE-D1D4147C080E): 创建数据库SBX_PRODUCTS_DIFF信息:启动任务 [stage-0:ddl]在序列模式错误中错误:失败:执行错误,返回 代码1来自org.apache.hadoop.hive.ql.exec.ddltask。数据库 sbx_products_diff已经存在信息:已完成 执行 命令(queryID = hive_2022041411555555555555555555555555555555555555551B7-40CA-8CEE-D1D4147C080E); 时间:0.014秒错误:处理语句时错误: 失败:执行错误,从 org.apache.hadoop.hive.ql.exec.ddltask。数据库 sbx_products_diff已经存在(状态= 42000,代码= 1)
但问题是该数据库实际上不存在:
jdbc:hive2:// myhost>删除数据库SBX_PRODUCTS_DIFF;
错误:编译语句时错误: 失败:smanticexception [错误10072]:数据库不存在: sbx_products_diff(state = 42000,代码= 10072)
似乎与该数据库有关,因为如果我运行完全相同的命令,但是使用另一个名称,它可以正常工作,如所期望的。有人可以做出指导我麻烦的根源是什么?还是我应该分享什么让您帮助我?
upd1:
如果您在Hive Warehouse文件夹中查看,您是否看到一个名为“ SBX_Products_diff”的文件夹?
不,目录不存在。但是我应该说另一件事,这很有趣。 _diff
名称的一部分是后缀。我的意思是有几个现有数据库 - sbx_products
,sbx_products_aux
,sbx_products_bkp
,..
- hdfs:// bla-bla/sbx_products/hive/pa
- hdfs:// bla-bla/sbx_products/hive/aux
- hdfs:// bla-bla/sbx_products/hive/bkp
- ...
另外,我已经搜索了我的数据库带有命令:
- HDFS DFS -LS -R / | GREP DIFF
- HDFS DFS -LS -R / | GREP SBX_PRODUCTS
,但与我的幽灵数据库没有任何关系。
I want to create hive database using the command:
create database sbx_products_diff
But it fails with the following error:
jdbc:hive2://myhost> create database sbx_products_diff;
INFO : Compiling
command(queryId=hive_20220414115555_9db94201-d1b7-40ca-8cee-d1d4147c080e):
create database sbx_products_diff INFO : Semantic Analysis
Completed INFO : Returning Hive schema: Schema(fieldSchemas:null,
properties:null) INFO : Completed compiling
command(queryId=hive_20220414115555_9db94201-d1b7-40ca-8cee-d1d4147c080e);
Time taken: 0.003 seconds INFO : Executing
command(queryId=hive_20220414115555_9db94201-d1b7-40ca-8cee-d1d4147c080e):
create database sbx_products_diff INFO : Starting task
[Stage-0:DDL] in serial mode ERROR : FAILED: Execution Error, return
code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Database
sbx_products_diff already exists INFO : Completed
executing
command(queryId=hive_20220414115555_9db94201-d1b7-40ca-8cee-d1d4147c080e);
Time taken: 0.014 seconds Error: Error while processing statement:
FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.DDLTask. Database
sbx_products_diff already exists (state=42000,code=1)
But the problem is that this database doesn't exists actually:
jdbc:hive2://myhost> drop database sbx_products_diff;
Error: Error while compiling statement:
FAILED: SemanticException [Error 10072]: Database does not exist:
sbx_products_diff (state=42000,code=10072)
Seems like this problem is related to this database particularly, because if I run exactly the same command, but with another name it works perfectly, as expected. Could someone make a direction what is the root of my troubles? Or what should I share to let you help me?
UPD1:
If you look in the hive warehouse folder, do you see a folder called "sbx_products_diff"?
No, the directory doesn't exist. But I should tell another thing, that is interesting. _diff
part of the name is suffix. I mean there are several existing databases - sbx_products
, sbx_products_aux
, sbx_products_bkp
, .. And all of those databases located in hdfs with the following structure:
- hdfs://bla-bla/sbx_products/hive/pa
- hdfs://bla-bla/sbx_products/hive/aux
- hdfs://bla-bla/sbx_products/hive/bkp
- ...
Also, I have already searched my database with commands like:
- hdfs dfs -ls -R / | grep diff
- hdfs dfs -ls -R / | grep sbx_products
But nothing related to my ghost database were found.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论