Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.23.0, 0.24.0
-
None
-
Reviewed
-
FsShell mkdir now accepts a -p flag. Like unix, mkdir -p will not fail if the directory already exists. Unlike unix, intermediate directories are always created, regardless of the flag, to avoid incompatibilities at this time.
Description
Users require the ability to create a directory iff it doesn't exist. Currently, running FsShell's mkdir twice will result in an already exists error. The unix mkdir -p flag won't fail if the directory already exists. Per parent jira, pig project would also like this feature.
(Eventually mkdir should probably also stop creating all intermediate dirs unless -p is given, but that's an incompatible change)
Attachments
Attachments
Issue Links
- is related to
-
HADOOP-8873 Port HADOOP-8175 (Add mkdir -p flag) to branch-1
- Resolved
- is required by
-
HDFS-3104 Add tests for mkdir -p
- Resolved