hive删除表错误
来源:互联网 发布:相片排版打印软件 编辑:程序博客网 时间:2024/06/01 01:33
在配好了hive环境,成功创建了表,并尝试load data local inpath ‘/home/data’ into table test 成功导入本地数据,觉得环境配置已经大功告成之后,问题又悄悄降临…删除表又报错了.
Error, return code 1 from org.apache.Hadoop.hive.ql.exec.DDLTask. MetaException
这什么错,看上去好像是mysql元数据的连接问题啊…于是百度了以下,发现要在mysql 中对hive数据库编码进行设置:
alter database hive character set latin1;
重启hadoop,重启hive,show tables;之后尝试 drop table test;
还是报错,想了想,会不会是之前hive启动出错时留下的问题,那么把mysql中的hive数据删掉重新创建一个看看。
删掉hive数据库,重建创建hive数据库,设置编码,再重启hadoop,重启hive:
drop database hive; create database hive; alter database hive character set latin1;
继续show tables;drop table test;
结局依然让人失望…还是报出了Error…
运行下面这条语句,debug信息打印控制台,我倒要看看到底什么bug…
hive -hiveconf hive.root.logger=DEBUG,console
看到了exception:
InvalidObjectException(message:Role admin already exists.) at org.apache.hadoop.hive.metastore.ObjectStore.addRole(ObjectStore.java:3187) ... at java.lang.reflect.Method.invoke(Method.java:606)InvalidObjectException(message:All is already granted by admin) at org.apache.hadoop.hive.metastore.ObjectStore.grantPrivileges(ObjectStore.java:3912) ... at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
显然,以我现在的水平看不出具体哪出错,只知道是mysql连接的问题。
再去百度上看看,有人说换掉mysql的connector jar包,我也试试..
然后把mysql-connector-java-5.1.6-bin.jar 删掉,从官网上下了个
mysql-connector-java-5.1.40-bin.jar,放入hive的lib下后,重启hive,又出现了别的提示信息:
Fri Dec 23 21:13:57 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
估计打印了5次上面的信息,一看就懵了..但是倒是进了hive,然后
show tables;drop table test;
神奇出现了,返回了OK!
问题锁定是connector的问题,但是上面这串提示什么鬼,查了一下,原来是高版本的connector 要指明是否使用ssl连接,可以在url中指定。我懒得修改hive-site.xml了,于是下了个connector-java-5.1.32-bin.jar,放到lib下,重启hadoop,重启hive,再创建一个test表,再删除,成功…但是我还是不知道是什么问题…也许是原来5.1.6的connector太老了吧….
- hive删除表错误
- hive删除表失败
- Hive删除表
- hive中删除表的错误Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException
- hive删除表错误:FAILED: SemanticException Unable to fetch table user_info. For direct MetaStore DB connect
- hive 创建/删除/截断表
- Hive 删除行, 表 ,清空类容
- 删除hive表的脚本
- 批量删除hive表分区
- hive删除包含较多分区表有错误
- hive 创建/删除/截断 表(翻译自Hive wiki)
- hive 创建/删除/截断 表(翻译自Hive wiki)
- hive 创建/删除/截断 表(翻译自Hive wiki)
- hive 创建/删除/截断 表(翻译自Hive wiki)
- hive 创建/删除/截断 表(翻译自Hive wiki)
- Hive错误
- Hive 表被锁定,无法删除表
- hive 表数据加载、表删除试验
- 【c++】编码规范及相应的配置方法
- 函数
- 终止进程的工具kill,killall,pkill和xkill
- 十、自定义类型转换器
- 责任链模式
- hive删除表错误
- 跟踪算法
- wireshark 相关提示
- Eclipse如何修改eclipse默认的工作空间路径
- Docker 基础 : 数据管理
- POJ 2115 C Looooops 已翻译
- 【LeetCode】 234. Palindrome Linked List
- 字符串处理——后缀自动机の板子
- Html5 快速排序演示