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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 2.4.0
    • None
    • namenode
    • Incompatible change
    • 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.2.patch
          9 kB
          Akira Ajisaka
        2. HDFS-6262.patch
          4 kB
          Akira Ajisaka

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: