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

Uma Maheswara Rao G commented on HDFS-15444:
--------------------------------------------

[~jianghuazhu], thanks you for the question.
It's already covered in mkdirs of ViewFileSystem specific [implementation | 
https://github.com/apache/hadoop/blob/5d8600e80ad7864b332b60d5a01585fdf00848ee/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java#L1429].
 It's should be an issue with mkdir of ViewFs.java.

The scenario is:
  mount link /a/b/c --> hdfs://nn1/a/b/c
  fallback --> hdfs://nn1/

 now if you try to create hdfs://nn1/a/b, it might end up creating a dir in 
hdfs://nn1/a/b, It should just return saying dir already exist in mount.
because it will check the parent dir first, that is hdfs://nn1/a/. Since /a is 
an internal dir, it will go to InternalViewFS#mkdir with path as /b to create.
Here it should check if internalViewFS /a existing children matching with the 
path /b. Yes, there is ia path already in mount link /a/b, so it should not 
create this path in fallback. We did not have that children check in 
[ViewFs.java|https://github.com/apache/hadoop/blob/5d8600e80ad7864b332b60d5a01585fdf00848ee/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFs.java#L1185]
 



> mkdir should not create dir in fallback if the dir already in mount Path
> ------------------------------------------------------------------------
>
>                 Key: HDFS-15444
>                 URL: https://issues.apache.org/jira/browse/HDFS-15444
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Uma Maheswara Rao G
>            Assignee: Uma Maheswara Rao G
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to