Hadoop Common
  1. Hadoop Common
  2. HADOOP-6897

FileSystem#mkdirs(FileSystem, Path, FsPermission) should not call setPermission if mkdirs failled

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.22.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Here is the piece of code that has the bug. fs.setPermission should not be called if result is false.

        public static boolean mkdirs(FileSystem fs, Path dir, FsPermission permission)
        throws IOException {
          // create the directory using the default permission
          boolean result = fs.mkdirs(dir);
          // set its permission to be the supplied one
          fs.setPermission(dir, permission);
          return result;
        }
      
      1. mkdirs.patch
        0.8 kB
        Hairong Kuang

        Issue Links

          Activity

          Hairong Kuang created issue -
          Hairong Kuang made changes -
          Field Original Value New Value
          Attachment mkdirs.patch [ 12451172 ]
          Hairong Kuang made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Todd Lipcon made changes -
          Link This issue is related to HDFS-1322 [ HDFS-1322 ]
          Jakob Homan made changes -
          Link This issue relates to HADOOP-6962 [ HADOOP-6962 ]
          Nigel Daley made changes -
          Fix Version/s 0.22.0 [ 12314296 ]
          Allen Wittenauer made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]

            People

            • Assignee:
              Hairong Kuang
              Reporter:
              Hairong Kuang
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:

                Development