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

FsShell mkdir -p makes an unnecessary check for the existence of the parent.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • fs
    • None
    • Reviewed

    Description

      The mkdir command in FsShell checks for the existence of the parent of the directory and returns an error if it doesn't exist. The -p option suppresses the error and allows the directory creation to continue, implicitly creating all missing intermediate directories. However, the existence check still runs even with -p specified, and its result is ignored. Depending on the file system, this is a wasteful RPC call (HDFS) or HTTP request (WebHDFS/S3/Azure) imposing extra latency for the client and extra load for the server.

      Attachments

        1. HADOOP-12172.001.patch
          1.0 kB
          Chris Nauroth

        Activity

          People

            cnauroth Chris Nauroth
            cnauroth Chris Nauroth
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: