Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7BDC71090E for ; Tue, 3 Dec 2013 17:38:44 +0000 (UTC) Received: (qmail 45878 invoked by uid 500); 3 Dec 2013 17:38:40 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 45778 invoked by uid 500); 3 Dec 2013 17:38:37 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 45756 invoked by uid 500); 3 Dec 2013 17:38:36 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 45747 invoked by uid 99); 3 Dec 2013 17:38:36 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Dec 2013 17:38:36 +0000 Date: Tue, 3 Dec 2013 17:38:36 +0000 (UTC) From: "Xuefu Zhang (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-5926) Load Data OverWrite Into Table Throw org.apache.hadoop.hive.ql.metadata.HiveException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-5926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13837929#comment-13837929 ] Xuefu Zhang commented on HIVE-5926: ----------------------------------- If I'm not mistaken, you're trying to load files with the same name into the same table. While it's valid to load multiple files into a table, I don't think hive should remove the destination. It's better to given an error rather than silently overwriting. The error msg from hive can be improved, but I think the behavior is expected. If you want to load the data twice, you'd better rename the data file before loading it again. > Load Data OverWrite Into Table Throw org.apache.hadoop.hive.ql.metadata.HiveException > ------------------------------------------------------------------------------------- > > Key: HIVE-5926 > URL: https://issues.apache.org/jira/browse/HIVE-5926 > Project: Hive > Issue Type: Bug > Components: Database/Schema > Affects Versions: 0.12.0 > Environment: OS: Red Hat Enterprise Linux Server release 6.2 > HDFS: CDH-4.2.1 > MAPRED: CDH-4.2.1-mr1 > Reporter: Yi Tian > > step1: create table > step2: load data > load data inpath '/tianyi/usys_etl_map_total.del' overwrite into table tianyi_test3 > step3: copy file back > hadoop fs -cp /user/hive/warehouse/tianyi_test3/usys_etl_map_total.del /tianyi > step4: load data again > load data inpath '/tianyi/usys_etl_map_total.del' overwrite into table tianyi_test3 > here we can see the error in console: > Failed with exception Error moving: hdfs://ocdccluster/tianyi/usys_etl_map_total.del into: /user/hive/warehouse/tianyi_test3/usys_etl_map_total.del > FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask > we can find error detail in hive.log: > 2013-12-03 17:26:41,717 ERROR exec.Task (SessionState.java:printError(419)) - Failed with exception Error moving: hdfs://ocdccluster/tianyi/usys_etl_map_total.del into: /user/hive/warehouse/tianyi_test3/usys_etl_map_total.del > org.apache.hadoop.hive.ql.metadata.HiveException: Error moving: hdfs://ocdccluster/tianyi/usys_etl_map_total.del into: /user/hive/warehouse/tianyi_test3/usys_etl_map_total.del > at org.apache.hadoop.hive.ql.metadata.Hive.replaceFiles(Hive.java:2323) > at org.apache.hadoop.hive.ql.metadata.Table.replaceFiles(Table.java:639) > at org.apache.hadoop.hive.ql.metadata.Hive.loadTable(Hive.java:1441) > 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.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: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:208) > Caused by: java.io.IOException: Error moving: hdfs://ocdccluster/tianyi/usys_etl_map_total.del into: /user/hive/warehouse/tianyi_test3/usys_etl_map_total.del > at org.apache.hadoop.hive.ql.metadata.Hive.replaceFiles(Hive.java:2317) > ... 20 more > 2013-12-03 17:26:41,718 ERROR ql.Driver (SessionState.java:printError(419)) - FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask -- This message was sent by Atlassian JIRA (v6.1#6144)