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

'LOAD DATA INPATH ... OVERWRITE ..' doesn't overwrite current data

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.12.0
    • 0.13.0
    • None
    • None

    Description

      In case where user loads data into table using overwrite, using a different file, it is not being overwritten.

      $ hdfs dfs -cat /tmp/data
      aaa
      bbb
      ccc
      $ hdfs dfs -cat /tmp/data2
      ddd
      eee
      fff
      $ hive
      hive> create table test (id string); 
      hive> load data inpath '/tmp/data' overwrite into table test;
      hive> select * from test;
      aaa
      bbb
      ccc
      hive> load data inpath '/tmp/data2' overwrite into table test;
      hive> select * from test;
      aaa
      bbb
      ccc
      ddd
      eee
      fff
      

      It seems it is broken by HIVE-3756 which added another condition to whether "rmr" should be run on old directory, and skips in this case.

      There is a workaround of set fs.hdfs.impl.disable.cache=true;
      which sabotages this condition, but this condition should be removed in long-term.

      Attachments

        1. HIVE-6209.1.patch
          6 kB
          Szehon Ho
        2. HIVE-6209.patch
          2 kB
          Szehon Ho

        Issue Links

          Activity

            People

              szehon Szehon Ho
              szehon Szehon Ho
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: