Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13082

RawLocalFileSystem does not fail when moving file to a non-existing directory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Later
    • 0.23.0
    • None
    • fs
    • None

    Description

      FileSystemContractBaseTest#testRenameFileMoveToNonExistentDirectory: creates a file then move it to a non-existing directory. It should fail but it will not (with RawLocalFileSystem) because in RawLocalFileSystem#rename(Path, Path) method we have a fallback behavior that accomplishes the rename by a full copy. The full copy will create the new directory and copy the file there.

      I see two possible solutions here:

      1. Remove the fallback full copy behavior
      2. Before full cp we should check whether the parent directory exists or not. If not return false an do not do the full copy.

      The fallback logic was added by HADOOP-9805.

      Attachments

        Issue Links

          Activity

            People

              boky01 Andras Bokor
              boky01 Andras Bokor
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: