Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-6262

HDFS doesn't raise FileNotFoundException if the source of a rename() is missing

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.4.0
    • Fix Version/s: None
    • Component/s: namenode
    • Labels:
    • Hadoop Flags:
      Incompatible change
    • Release Note:
      HDFS's rename(src, dst) throws FileNotFoundException instead of logging warn message and returning false if the source of the rename does not exist.

      Description

      HDFS's rename(src, dest) returns false if src does not exist -all the other filesystems raise FileNotFoundException

      This behaviour is defined in FSDirectory.unprotectedRenameTo() -the attempt is logged, but the operation then just returns false.

      I propose changing the behaviour of DistributedFileSystem to be the same as that of the others -and of FileContext, which does reject renames with nonexistent sources

        Attachments

        1. HDFS-6262.patch
          4 kB
          Akira Ajisaka
        2. HDFS-6262.2.patch
          9 kB
          Akira Ajisaka

          Issue Links

            Activity

              People

              • Assignee:
                ajisakaa Akira Ajisaka
                Reporter:
                stevel@apache.org Steve Loughran
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: