Hive'无法改变表'错误

时间:2014-07-25 03:00:40

标签: mysql hadoop hive derby

我将数据加载到表格时出现错误,感谢您的帮助。

hive> load data local inpath '/home/Xperttech/Desktop/datagen_10.txt' into table patient;

Copying data from file:/home/Xperttech/Desktop/datagen_10.txt
Copying file: file:/home/Xperttech/Desktop/datagen_10.txt
Loading data to table default.patient
Failed with exception Unable to alter table.
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

然而,数据会正常插入。

只有当我使用mysql进行Metastore时才会发生这种情况。当我改回德比时,一切正常。 我确信mysql运行良好,来自hive的登录成功。

Hive日志:

2014-07-24 20:36:55,136 ERROR exec.Task (SessionState.java:printError(419)) - Failed with exception Unable to alter table.
org.apache.hadoop.hive.ql.metadata.HiveException: Unable to alter table.
        at org.apache.hadoop.hive.ql.metadata.Hive.alterTable(Hive.java:387)
        at org.apache.hadoop.hive.ql.metadata.Hive.loadTable(Hive.java:1448)
        at org.apache.hadoop.hive.ql.exec.MoveTask.execute(MoveTask.java:283)
        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.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:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
Caused by: MetaException(message:org.datanucleus.exceptions.NucleusDataStoreException: Iteration request failed : SELECT `A0`.`BUCKET_COL_NAME`,`A0`.`INTEGER_IDX` AS NUCORDER0 FROM `BUCKETING_COLS` `A0` WHERE `A0`.`SD_ID` = ? AND `A0`.`INTEGER_IDX` >= 0 ORDER BY NUCORDER0)
        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_table_with_environment_context(HiveMetaStore.java:2408)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

2 个答案:

答案 0 :(得分:1)

I have faced this issue and by providing the hive and hdfs user access to the infa BDE user it worked fine.

答案 1 :(得分:0)

问题解决了。使用兼容版本的MySQL Java连接器。