hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manoj Govindassamy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-5692) viewfs shows resolved path in FileNotFoundException
Date Wed, 09 Nov 2016 02:10:01 GMT

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

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

[~kturner],

This sounds useful. Apps invoking vfs.listStatus() will get to see the VFS paths in the exception
and not the internal paths. It is also very important to throw FileNotFoundException() whenever
paths being accessed are not. But, FileNotFoundException unfortunately doesn't accept a throwable.
So, throwing a nested FileNotFoundExceptions is not possible. We can throw an IOException
carrying VFS path details and nested with FileNotFoundException carrying internal path details.
But that will violate the contract of listStatus() API. 

> 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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message