hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kirk True (JIRA)" <>
Subject [jira] Created: (HIVE-1996) "LOAD DATA INPATH" fails when the table already contains a file of the same name
Date Wed, 16 Feb 2011 20:21:25 GMT
"LOAD DATA INPATH" fails when the table already contains a file of the same name

                 Key: HIVE-1996
             Project: Hive
          Issue Type: Bug
    Affects Versions: 0.7.0
            Reporter: Kirk True
            Assignee: Kirk True


1. From the command line copy the kv2.txt data file into the current user's HDFS directory:

    $ hadoop fs -copyFromLocal /path/to/hive/sources/data/files/kv2.txt kv2.txt

2. In Hive, create the table:

    create table tst_src1 (key_ int, value_ string);

3. Load the data into the table from HDFS:

    load data inpath './kv2.txt' into table tst_src1;

4. Repeat step 1
5. Repeat step 3


To have kv2.txt renamed in HDFS and then copied to the destination as per HIVE-307.


File is renamed, but Hive.copyFiles doesn't "see" the change in "srcs" as it continues to
use the same array elements (with the un-renamed, old file names). It crashes with this error:

    at org.apache.hadoop.hive.ql.metadata.Hive.copyFiles(
    at org.apache.hadoop.hive.ql.metadata.Table.copyFiles(
    at org.apache.hadoop.hive.ql.metadata.Hive.loadTable(
    at org.apache.hadoop.hive.ql.exec.MoveTask.execute(
    at org.apache.hadoop.hive.ql.exec.Task.executeTask(
    at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(
    at org.apache.hadoop.hive.ql.Driver.launchTask(
    at org.apache.hadoop.hive.ql.Driver.execute(
    at org.apache.hadoop.hive.cli.CliDriver.processCmd(
    at org.apache.hadoop.hive.cli.CliDriver.processLine(
    at org.apache.hadoop.hive.cli.CliDriver.main(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at org.apache.hadoop.util.RunJar.main(

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message