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.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: fs
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: