gpt4 book ai didi

hadoop - CREATE TABLE 命令在 Hive 查询语言中不起作用

转载 作者:可可西里 更新时间:2023-11-01 14:53:01 26 4
gpt4 key购买 nike

当我尝试在配置单元中创建表时收到以下错误消息。知道为什么会这样吗?

hive> create table a (x int);

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:For direct MetaStore DB connections, we don't support retries at the client level.)

日志如下:

 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate key name 'TBLS_FK2' at sun.reflect.GeneratedConstructorAccessor25.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorA‌​ccessorImpl.java:45) 

最佳答案

这可能对你有用。

必须使用 SCHEMA TOOL 初始化模式

命令:$HIVE_HOME/bin/schematool -dbType mysql -initSchema

注意:在您的情况下,如果您将 mysql 用作 rdbms,则 -dbType 是 mysql。

请引用以下链接:https://cwiki.apache.org/confluence/display/Hive/Hive+Schema+Tool

关于hadoop - CREATE TABLE 命令在 Hive 查询语言中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32643906/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com