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

Jianfei Jiang edited comment on HDFS-13401 at 4/9/18 9:26 AM:
--------------------------------------------------------------

As InternalDirOfViewFs is readonly, The path of a mount path cannot be created 
if no deeper path is givern. I made a prospective in patch 000, mkdir function 
for ViewFileSystem is changed when resolving the path. I wonder if it is 
necessary to make this change and if this change is proper.

Try to change mkdir function in FileContext as well.


was (Author: jiangjianfei):
As InternalDirOfViewFs is readonly, The path of a mount path cannot be created 
if no deeper path is givern. I changed mkdir function for ViewFileSystem when 
resolving the path. I wonder if it is necessary to make this change and if this 
change is proper.

Try to change mkdir function in FileContext as well.

> Different behavior in mkdir when the target folder of mount table is uncreated
> ------------------------------------------------------------------------------
>
>                 Key: HDFS-13401
>                 URL: https://issues.apache.org/jira/browse/HDFS-13401
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: federation, hdfs
>    Affects Versions: 3.0.1
>            Reporter: Jianfei Jiang
>            Priority: Major
>         Attachments: HDFS-13401.000.patch
>
>
> In federation cases, if we have a config like below:
> <property>
>  <name>fs.viewfs.mounttable.ClusterX.link./foo</name>
>  <value>hdfs://nn2-clusterx.example.com:8020/footarget</value>
>  </property>
> When the folder hdfs://nn2-clusterx.example.com:8020/projects/footarget is 
> not actually exist, the command {{hdfs dfs ls /}} can still see the folder, 
> but the folder is not actually exist. then we try to use mkdir command to 
> create the viewfs folder {{hdfs dfs mkdir /foo}}, the return code is true, 
> but the folder is not created. However, when we use {{hdfs dfs mkdir -p 
> /foo/xxx}} which have a deeper location to create folder, the folder is 
> successfully created. The results in these two cases may be ambigiuous.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to