You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Erik Krogen (JIRA)" <ji...@apache.org> on 2017/03/21 21:50:41 UTC
[jira] [Comment Edited] (HDFS-8413) Directories are not listed
recursively when fs.defaultFs is viewFs
[ https://issues.apache.org/jira/browse/HDFS-8413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15935393#comment-15935393 ]
Erik Krogen edited comment on HDFS-8413 at 3/21/17 9:49 PM:
------------------------------------------------------------
I think this unexpected {{ls -r}} behavior is undesirable but those directories _are_ in fact symlinks and FileStatus specifically states that something can't be both a symlink and a directory:
{code}
// The variables isdir and symlink indicate the type:
// 1. isdir implies directory, in which case symlink must be null.
// 2. !isdir implies a file or symlink, symlink != null implies a
// symlink, otherwise it's a file.
{code}
It is actually more of the client's responsibility to dereference symlinks. The {{ls}} command specifically avoids dereferencing symlinks.
[~manojg], I know you've been working on ViewFS recently, do you have any thoughts on this behavior?
was (Author: xkrogen):
I think this unexpected {{ls -r}} behavior is undesirable but those directories _are_ in fact symlinks and FileStatus specifically states that something can't be both a symlink and a directory:
{{code}}
// The variables isdir and symlink indicate the type:
// 1. isdir implies directory, in which case symlink must be null.
// 2. !isdir implies a file or symlink, symlink != null implies a
// symlink, otherwise it's a file.
{{code}}
It is actually more of the client's responsibility to dereference symlinks. The {{ls}} command specifically avoids dereferencing symlinks.
[~manojg], I know you've been working on ViewFS recently, do you have any thoughts on this behavior?
> Directories are not listed recursively when fs.defaultFs is viewFs
> ------------------------------------------------------------------
>
> Key: HDFS-8413
> URL: https://issues.apache.org/jira/browse/HDFS-8413
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 2.7.0
> Reporter: Ajith S
> Assignee: Ajith S
> Labels: viewfs
> Attachments: HDFS-8413.patch
>
>
> Mount a cluster on client throught viewFs mount table
> Example:
> {quote}
> <property>
> <name>fs.defaultFS</name>
> <value>viewfs:///</value>
> </property>
> <property>
> <name>fs.viewfs.mounttable.default.link./nn1</name>
> <value>hdfs://ns1/</value> <!-- HA nameservice -->
> </property>
> <property>
> <name>fs.viewfs.mounttable.default.link./user</name>
> <value>hdfs://host-72:8020/</value>
> </property>
> <property>
> {quote}
> Try to list the files recursively *(hdfs dfs -ls -R / or hadoop fs -ls -R /)* only the parent folders are listed.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org