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

LocalFileContext does not throw an exception on mkdir for already existing directory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Critical
    • Resolution: Unresolved
    • 2.0.3-alpha
    • None
    • None

    Description

      according to
      http://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FileContext.html#mkdir%28org.apache.hadoop.fs.Path,%20org.apache.hadoop.fs.permission.FsPermission,%20boolean%29

      should throw a FileAlreadyExistsException if the directory already exists.

      I tested this and

      FileContext lfc = FileContext.getLocalFSFileContext(new Configuration());
      Path p = new Path("/tmp/bobby.12345");
      FsPermission cachePerms = new FsPermission((short) 0755);
      lfc.mkdir(p, cachePerms, false);
      lfc.mkdir(p, cachePerms, false);
      

      never throws an exception.

      Attachments

        1. HADOOP-9438.20130501.1.patch
          26 kB
          Rémy Saissy
        2. HADOOP-9438.20130521.1.patch
          2 kB
          Rémy Saissy
        3. HADOOP-9438.patch
          14 kB
          Rémy Saissy
        4. HADOOP-9438.patch
          135 kB
          Rémy Saissy

        Issue Links

          Activity

            People

              Unassigned Unassigned
              revans2 Robert Joseph Evans
              Votes:
              0 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated: