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

Manoj Govindassamy commented on HDFS-5692:
------------------------------------------

Thanks for the views. Yes, {{NotInMountPointException}} will be misleading as 
you explained.  On peer discussions I heard views against option 1. So, shall 
we wait a bit more to hear other alternatives before moving with Option 1 ?

Another option is, we can make {{ViewFileSystem#listStatus}} catch the 
FileNotFoundException and throw the same with a its version of Path which is 
not fully resolved. 


> viewfs shows resolved path in FileNotFoundException
> ---------------------------------------------------
>
>                 Key: HDFS-5692
>                 URL: https://issues.apache.org/jira/browse/HDFS-5692
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>    Affects Versions: 2.2.0
>            Reporter: Keith Turner
>            Assignee: Manoj Govindassamy
>
> With the following config, if I call fs.listStatus("/nn1/a/b") when 
> {{/nn1/a/b}} does not exist then ...
> {noformat}
> <configuration>
>   <property>
>     <name>fs.default.name</name>
>     <value>viewfs:///</value>
>   </property>
>   <property>
>     <name>fs.viewfs.mounttable.default.link./nn1</name>
>     <value>hdfs://host1:9000</value>
>   </property>
>   <property>
>     <name>fs.viewfs.mounttable.default.link./nn2</name>
>     <value>hdfs://host2:9000</value>
>   </property>
> </configuration>
> {noformat}
> I will see an error message like the following.  
> {noformat}
> java.io.FileNotFoundException: File /a/b does not exist.
>         at 
> org.apache.hadoop.hdfs.DistributedFileSystem.listStatusInternal(DistributedFileSystem.java:644)
>         at 
> org.apache.hadoop.hdfs.DistributedFileSystem.access$600(DistributedFileSystem.java:92)
>         at 
> org.apache.hadoop.hdfs.DistributedFileSystem$14.doCall(DistributedFileSystem.java:702)
>         at 
> org.apache.hadoop.hdfs.DistributedFileSystem$14.doCall(DistributedFileSystem.java:698)
>         at 
> org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
>         at 
> org.apache.hadoop.hdfs.DistributedFileSystem.listStatus(DistributedFileSystem.java:698)
>         at 
> org.apache.hadoop.fs.FilterFileSystem.listStatus(FilterFileSystem.java:222)
>         at 
> org.apache.hadoop.fs.viewfs.ChRootedFileSystem.listStatus(ChRootedFileSystem.java:228)
>         at 
> org.apache.hadoop.fs.viewfs.ViewFileSystem.listStatus(ViewFileSystem.java:366)
> {noformat}
> I think it would be useful for ViewFS to wrap the FileNotFoundException from 
> the inner filesystem, giving an error message like the following.  The 
> following error message has the resolved and unresolved paths which is very 
> useful for debugging.
> {noformat}
> java.io.FileNotFoundException: File /nn1/a/b does not exist.
>         at 
> org.apache.hadoop.fs.viewfs.ViewFileSystem.listStatus(ViewFileSystem.java:366)
> Caused by: java.io.FileNotFoundException: File /a/b does not exist.
>         at 
> org.apache.hadoop.hdfs.DistributedFileSystem.listStatusInternal(DistributedFileSystem.java:644)
>         at 
> org.apache.hadoop.hdfs.DistributedFileSystem.access$600(DistributedFileSystem.java:92)
>         at 
> org.apache.hadoop.hdfs.DistributedFileSystem$14.doCall(DistributedFileSystem.java:702)
>         at 
> org.apache.hadoop.hdfs.DistributedFileSystem$14.doCall(DistributedFileSystem.java:698)
>         at 
> org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
>         at 
> org.apache.hadoop.hdfs.DistributedFileSystem.listStatus(DistributedFileSystem.java:698)
>         at 
> org.apache.hadoop.fs.FilterFileSystem.listStatus(FilterFileSystem.java:222)
>         at 
> org.apache.hadoop.fs.viewfs.ChRootedFileSystem.listStatus(ChRootedFileSystem.java:228)
>         at 
> org.apache.hadoop.fs.viewfs.ViewFileSystem.listStatus(ViewFileSystem.java:366)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
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