Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-6262

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

    Details

    • Type: Bug Bug
    • Status: Patch Available
    • Priority: Major Major
    • Resolution: Unresolved
    • 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

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

        Issue Links

          Activity

          Steve Loughran created issue -
          Steve Loughran made changes -
          Field Original Value New Value
          Link This issue is depended upon by HADOOP-9361 [ HADOOP-9361 ]
          Akira AJISAKA made changes -
          Assignee Akira AJISAKA [ ajisakaa ]
          Akira AJISAKA made changes -
          Attachment HDFS-6262.patch [ 12641075 ]
          Akira AJISAKA made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Akira AJISAKA made changes -
          Hadoop Flags Incompatible change [ 10342 ]
          Release Note HDFS's rename(src, dst) throws FileNotFoundException instead of returning false if the source of the rename does not exist.
          Akira AJISAKA made changes -
          Attachment HDFS-6262.2.patch [ 12641192 ]
          Akira AJISAKA made changes -
          Release Note HDFS's rename(src, dst) throws FileNotFoundException instead of returning false if the source of the rename does not exist. HDFS's rename(src, dst) throws FileNotFoundException instead of logging warn message and returning false if the source of the rename does not exist.
          Tsz Wo Nicholas Sze made changes -
          Link This issue relates to HADOOP-6240 [ HADOOP-6240 ]
          Tsz Wo Nicholas Sze made changes -
          Link This issue relates to HDFS-654 [ HDFS-654 ]
          Steve Loughran made changes -
          Link This issue is depended upon by HADOOP-9361 [ HADOOP-9361 ]
          Allen Wittenauer made changes -
          Labels BB2015-05-TBR

            People

            • Assignee:
              Akira AJISAKA
              Reporter:
              Steve Loughran
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:

                Development