Hadoop Common
  1. Hadoop Common
  2. HADOOP-10375

Local FS doesn't raise an error on mkdir() over a file

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.3.0
    • Fix Version/s: None
    • Component/s: fs
    • Labels:
      None

      Description

      if you mkdir() on a path where there is already a file, the operation does
      not fail. Instead the operation returns 0.

      This is at odds with the behaviour of HDFS.

      HADOOP-6229 add the check for the parent dir not being a file, but something similar is needed for the destination dir itself

        Issue Links

          Activity

          Hide
          Steve Loughran added a comment -

          ...actually, you could have the check for the destination being a file only run after the mkdir() operation returned false

          Show
          Steve Loughran added a comment - ...actually, you could have the check for the destination being a file only run after the mkdir() operation returned false
          Hide
          Steve Loughran added a comment -

          This may depend on Java 7 providing better APIs -a check and fail wouldn't be atomic

          Show
          Steve Loughran added a comment - This may depend on Java 7 providing better APIs -a check and fail wouldn't be atomic

            People

            • Assignee:
              Steve Loughran
              Reporter:
              Steve Loughran
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development