You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Sandy Ryza (JIRA)" <ji...@apache.org> on 2012/09/07 02:39:07 UTC

[jira] [Commented] (HADOOP-8616) ViewFS configuration requires a trailing slash

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

Sandy Ryza commented on HADOOP-8616:
------------------------------------

The problem occurs when the ViewFileSystem attempts to create a ChRootedFileSystem as its target file system.  It calls getPath() on the URI object passed to it, which, for a URI like "hdfs://ha-nn-uri", returns an empty string.  Where does it make the most sense to handle this?  Where the ViewFileSystem reads the config (in the InodeTree constructor)? Where the ViewFileSystem creates the URI (inside the createLink() method in InodeTree)? In the ChRootedFileSystem constructor?
                
> ViewFS configuration requires a trailing slash
> ----------------------------------------------
>
>                 Key: HADOOP-8616
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8616
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: viewfs
>    Affects Versions: 0.23.0, 2.0.0-alpha
>            Reporter: Eli Collins
>
> If the viewfs config doesn't have a trailing slash commands like the following fail:
> {noformat}
> bash-3.2$ hadoop fs -ls
> -ls: Can not create a Path from an empty string
> Usage: hadoop fs [generic options] -ls [-d] [-h] [-R] [<path> ...]
> {noformat}
> We hit this problem with the following configuration because "hdfs://ha-nn-uri" does not have a trailing "/".
> {noformat}
>   <property>
>   <name>fs.viewfs.mounttable.foo.link./nameservices/ha-nn-uri</name>
>   <value>hdfs://ha-nn-uri</value>
>   </property>
> {noformat}

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