[ 
https://issues.apache.org/jira/browse/HADOOP-8873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13702418#comment-13702418
 ] 

Akira AJISAKA commented on HADOOP-8873:
---------------------------------------

On 1.2.0, mkdir doesn't fail if parent direcotry exists.

{code}
$ hadoop dfs -mkdir parent
$ hadoop dfs -mkdir parent/child

$ hadoop dfs -ls parent
Found 1 items
drwxr-xr-x   - hadoop supergroup          0 2013-07-08 13:35 
/user/hadoop/parent/child
{code}

If -p option is set, both parent/child2 and "-p" directories are created.

{code}
$ hadoop dfs -mkdir -p parent/child2
$ hadoop dfs -ls
Found 2 items
drwxr-xr-x   - hadoop supergroup          0 2013-07-08 13:35 /user/hadoop/-p
drwxr-xr-x   - hadoop supergroup          0 2013-07-08 13:35 /user/hadoop/parent

$ hadoop dfs -ls parent
Found 2 items
drwxr-xr-x   - hadoop supergroup          0 2013-07-08 13:35 
/user/hadoop/parent/child
drwxr-xr-x   - hadoop supergroup          0 2013-07-08 13:35 
/user/hadoop/parent/child2
{code}
                
> Port HADOOP-8175 (Add mkdir -p flag) to branch-1
> ------------------------------------------------
>
>                 Key: HADOOP-8873
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8873
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 1.0.0
>            Reporter: Eli Collins
>              Labels: newbie
>
> Per HADOOP-8551 let's port the mkdir -p option to branch-1 for a 1.x release 
> to help users transition to the new shell behavior. In Hadoop 2.x mkdir 
> currently requires the -p option to create parent directories but a program 
> that specifies it won't work on 1.x since it doesn't support this option.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to