hive中删除表的错误Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException

原创 2014年09月09日 23:51:30

1:请看操作

[jifeng@jifeng02 hive-0.12.0-bin]$ hive

Logging initialized using configuration in jar:file:/home/jifeng/hadoop/hive-0.12.0-bin/lib/hive-common-0.12.0.jar!/hive-log4j.properties
hive> show tables;
OK
t1
tianq
tianqi
Time taken: 3.338 seconds, Fetched: 3 row(s)
hive> drop table t1;
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:javax.jdo.JDODataStoreException: Iteration request failed : SELECT `A0`.`COMMENT`,`A0`.`COLUMN_NAME`,`A0`.`TYPE_NAME`,`A0`.`INTEGER_IDX` AS NUCORDER0 FROM `COLUMNS_V2` `A0` WHERE `A0`.`CD_ID` = ? AND `A0`.`INTEGER_IDX` >= 0 ORDER BY NUCORDER0
        at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:451)
        at org.datanucleus.api.jdo.JDOPersistenceManager.jdoRetrieve(JDOPersistenceManager.java:610)
        at org.datanucleus.api.jdo.JDOPersistenceManager.retrieve(JDOPersistenceManager.java:622)
        at org.datanucleus.api.jdo.JDOPersistenceManager.retrieve(JDOPersistenceManager.java:631)
        at org.apache.hadoop.hive.metastore.ObjectStore.removeUnusedColumnDescriptor(ObjectStore.java:2293)
        at org.apache.hadoop.hive.metastore.ObjectStore.preDropStorageDescriptor(ObjectStore.java:2321)
        at org.apache.hadoop.hive.metastore.ObjectStore.dropTable(ObjectStore.java:742)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.hive.metastore.RetryingRawStore.invoke(RetryingRawStore.java:124)
        at com.sun.proxy.$Proxy10.dropTable(Unknown Source)
        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.drop_table_core(HiveMetaStore.java:1192)
        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.drop_table_with_environment_context(HiveMetaStore.java:1328)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:103)
        at com.sun.proxy.$Proxy11.drop_table_with_environment_context(Unknown Source)
        at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.dropTable(HiveMetaStoreClient.java:671)
        at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.dropTable(HiveMetaStoreClient.java:647)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:89)
        at com.sun.proxy.$Proxy12.dropTable(Unknown Source)
        at org.apache.hadoop.hive.ql.metadata.Hive.dropTable(Hive.java:869)
        at org.apache.hadoop.hive.ql.metadata.Hive.dropTable(Hive.java:836)
        at org.apache.hadoop.hive.ql.exec.DDLTask.dropTable(DDLTask.java:3329)
        at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:277)
        at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:151)
        at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:65)
        at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1414)
        at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1192)
        at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1020)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:888)
        at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
        at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:781)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
NestedThrowablesStackTrace:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.Util.getInstance(Util.java:381)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
        at com.mysql.jdbc.StatementImpl.executeSimpleNonQuery(StatementImpl.java:1463)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1869)
        at com.jolbox.bonecp.PreparedStatementHandle.executeQuery(PreparedStatementHandle.java:172)
        at org.datanucleus.store.rdbms.ParamLoggingPreparedStatement.executeQuery(ParamLoggingPreparedStatement.java:381)
        at org.datanucleus.store.rdbms.SQLController.executeStatementQuery(SQLController.java:504)
        at org.datanucleus.store.rdbms.scostore.JoinListStore.listIterator(JoinListStore.java:748)
        at org.datanucleus.store.rdbms.scostore.AbstractListStore.listIterator(AbstractListStore.java:92)
        at org.datanucleus.store.rdbms.scostore.AbstractListStore.iterator(AbstractListStore.java:82)
        at org.datanucleus.store.types.backed.List.loadFromStore(List.java:300)
        at org.datanucleus.store.types.backed.List.load(List.java:273)
        at org.datanucleus.state.JDOStateManager.loadUnloadedFields(JDOStateManager.java:2967)
        at org.datanucleus.api.jdo.state.Hollow.transitionRetrieve(Hollow.java:168)
        at org.datanucleus.state.AbstractStateManager.retrieve(AbstractStateManager.java:598)
        at org.datanucleus.ExecutionContextImpl.retrieveObject(ExecutionContextImpl.java:1778)
        at org.datanucleus.ExecutionContextThreadedImpl.retrieveObject(ExecutionContextThreadedImpl.java:203)
        at org.datanucleus.api.jdo.JDOPersistenceManager.jdoRetrieve(JDOPersistenceManager.java:605)
        at org.datanucleus.api.jdo.JDOPersistenceManager.retrieve(JDOPersistenceManager.java:622)
        at org.datanucleus.api.jdo.JDOPersistenceManager.retrieve(JDOPersistenceManager.java:631)
        at org.apache.hadoop.hive.metastore.ObjectStore.removeUnusedColumnDescriptor(ObjectStore.java:2293)
        at org.apache.hadoop.hive.metastore.ObjectStore.preDropStorageDescriptor(ObjectStore.java:2321)
        at org.apache.hadoop.hive.metastore.ObjectStore.dropTable(ObjectStore.java:742)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.hive.metastore.RetryingRawStore.invoke(RetryingRawStore.java:124)
        at com.sun.proxy.$Proxy10.dropTable(Unknown Source)
        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.drop_table_core(HiveMetaStore.java:1192)
        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.drop_table_with_environment_context(HiveMetaStore.java:1328)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:103)
        at com.sun.proxy.$Proxy11.drop_table_with_environment_context(Unknown Source)
        at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.dropTable(HiveMetaStoreClient.java:671)
        at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.dropTable(HiveMetaStoreClient.java:647)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:89)
        at com.sun.proxy.$Proxy12.dropTable(Unknown Source)
        at org.apache.hadoop.hive.ql.metadata.Hive.dropTable(Hive.java:869)
        at org.apache.hadoop.hive.ql.metadata.Hive.dropTable(Hive.java:836)
        at org.apache.hadoop.hive.ql.exec.DDLTask.dropTable(DDLTask.java:3329)
        at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:277)
        at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:151)
        at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:65)
        at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1414)
        at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1192)
        at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1020)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:888)
        at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
        at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:781)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
)
hive> show tables;  
OK
t1
tianq
tianqi
Time taken: 0.033 seconds, Fetched: 3 row(s)
hive> drop table tianq;
FAILED: SemanticException [Error 10001]: Table not found tianq
hive> show tables;     
OK
t1
tianq
tianqi
Time taken: 0.022 seconds, Fetched: 3 row(s)


记得前2天用sqoop从mysql导入数据到hive出现的错误,后面替换mysql-connector-java-5.1.32-bin.jar包解决问题的

我也用这个新的包试试,并且把mysql-connector-java-5.1.6-bin.jar删除


[jifeng@jifeng02 mysql-connector-java-5.1.32]$ cp mysql-connector-java-5.1.32-bin.jar /home/jifeng/hadoop/hive-0.12.0-bin/lib
[jifeng@jifeng02 mysql-connector-java-5.1.32]$ cd ..
[jifeng@jifeng02 ~]$ cd  /home/jifeng/hadoop/hive-0.12.0-bin/lib
[jifeng@jifeng02 lib]$ rm mysql-connector-java-5.1.6-bin.jar 

问题解决了,估计是mysql的bug吧

[jifeng@jifeng02 hive-0.12.0-bin]$ hive

Logging initialized using configuration in jar:file:/home/jifeng/hadoop/hive-0.12.0-bin/lib/hive-common-0.12.0.jar!/hive-log4j.properties
hive> show tables;
OK
t1
tianq
tianqi
Time taken: 2.182 seconds, Fetched: 3 row(s)
hive> drop table t1;
OK
Time taken: 1.02 seconds
hive> select * from tianq;
OK
Time taken: 0.192 seconds
hive> drop table tianq;
OK
Time taken: 0.28 seconds



hive.ql.exec.DDLTask. MetaException(message:java.io.IOException: Attempt to start meta tracker faile

hive> CREATE TABLE hbase_table_1(key int, value string) > STORED BY 'org.apache.hadoop.hive.hba...
  • wind520
  • wind520
  • 2014-10-08 13:30:29
  • 4296

load数据到hive分区表报错: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTas

在启动hive创建表的时候,兴许你们回碰到这个错误:http://blog.csdn.net/qq_35732963/article/details/54139581;百度一下,说是字符编码的问题,那...
  • qq_35732963
  • qq_35732963
  • 2017-01-09 20:07:12
  • 6153

hive的使用

1.创建table; 2.导入本地数据: 3.查询hive表 4.查看hdfs目录下的文件(表数据) 注:如出现查看表数据存在,但是执行 select查询hive表出现null可能是数...
  • SONGCHUNHONG
  • SONGCHUNHONG
  • 2016-05-23 16:57:58
  • 3262

关于使用hive删除表时出现的return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException

Hive的元数据库为mysql,删除表时出现的org.apache.hadoop.hive.ql.exec.DDLTask. MetaException异常的解决办法。...
  • qqq824908000
  • qqq824908000
  • 2017-05-06 18:50:16
  • 319

Hive创建表格报【Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException】引发的血案

成功启动Hive,创建表格时Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException的解决方案...
  • u011812294
  • u011812294
  • 2016-12-15 19:51:15
  • 3201

hive创建表失败:FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask.

前言:本文是在博主:http://blog.sina.com.cn/s/blog_7673d4a50102v7s1.html;博客基础上对遇到的问题的一个总结 把hive 的metada...
  • qq_35732963
  • qq_35732963
  • 2017-01-06 16:37:56
  • 2834

HIVE2:ERROR [main]: ql.Driver (:()) - FAILED: Execution Error, return code 1 from org.apache.hadoop.

在Hive2.1 on Tez环境中运行select count(*) from students;时,遇到 ERROR [main]: ql.Driver (:()) - FAILED: Execu...
  • swing2008
  • swing2008
  • 2016-12-21 11:31:53
  • 2486

FAILED: Execution Error, return code 3 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask

Total MapReduce jobs = 1 14/08/24 20:29:11 WARN conf.Configuration: mapred.max.split.size is de...
  • oaimm
  • oaimm
  • 2014-08-26 14:03:08
  • 5121

程序中执行hive sql出错[FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask]

运行SQL时出了个错: SQL: INSERT OVERWRITE DIRECTORY 'result/testConsole' select count(1) from nutable;  ...
  • kexinmei
  • kexinmei
  • 2015-01-12 09:17:30
  • 10032

Hive常见问题汇总

这里小编汇集,使用Hive时遇到的常见问题。 1,执行#hive命令进入Hive CLI时报如下错误:Exception in thread "main" java.lang.RuntimeExce...
  • freedomboy319
  • freedomboy319
  • 2015-04-02 09:58:49
  • 31523
收藏助手
不良信息举报
您举报文章:hive中删除表的错误Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException
举报原因:
原因补充:

(最多只允许输入30个字)