Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
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.