【发布时间】:2015-09-18 04:29:46
【问题描述】:
当我尝试在 hive 中创建表时,收到以下错误消息。知道为什么会这样吗?
hive> create table a (x int);
FAILED:执行错误,从 org.apache.hadoop.hive.ql.exec.DDLTask 返回代码 1。 MetaException(message:对于直接MetaStore DB连接,我们不支持在客户端重试。)
以下是日志:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate key name 'TBLS_FK2' at sun.reflect.GeneratedConstructorAccessor25.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
【问题讨论】:
-
你能提供 hive 日志吗?还有你使用的是 derby 还是 mysql 的 metastore?
-
感谢您的回复。我正在使用 mysql 元存储。在 /tmp/username 下创建的扩展名为 .pipeout 的日志文件为空。有没有办法启用日志记录
-
以下是日志快照:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:sun.reflect.GeneratedConstructorAccessor25.newInstance(Unknown Source) at sun.reflect 中的键名“TBLS_FK2”重复。 DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
-
您可以尝试停止配置单元服务器并登录到 mysql 并删除元存储并重新启动服务器。我认为可能有一些旧的元存储在 mysql 中没有正确升级或元存储表没有正确创建
-
此链接可能对您有所帮助qnalist.com/questions/5919571/…
标签: hadoop hive metastore apache-hive