Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-3300

LOAD DATA INPATH fails if a hdfs file with same name is added to table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.10.0
    • 0.11.0
    • Import/Export
    • None
    • ubuntu linux, hadoop 1.0.3, hive 0.9

    • Reviewed

    Description

      If we are loading data from local fs to hive tables using 'LOAD DATA LOCAL INPATH' and if a file with the same name exists in the table's location then the new file will be suffixed by *_copy_1.

      But if we do the 'LOAD DATA INPATH' for a file in hdfs then there is no rename happening but just a move task is getting triggered. Since a file with same name exists in same hdfs location, hadoop fs move operation throws an error.

      hive> LOAD DATA INPATH '/userdata/bejoy/site.txt' INTO TABLE test.site;
      Loading data to table test.site
      Failed with exception null
      FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask
      hive>

      Attachments

        1. HIVE-3300.1.patch.txt
          15 kB
          Navis Ryu
        2. HIVE-3300.D4383.3.patch
          15 kB
          Phabricator
        3. HIVE-3300.D4383.4.patch
          15 kB
          Phabricator

        Activity

          People

            navis Navis Ryu
            bejoyks Bejoy KS
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: