[ https://issues.apache.org/jira/browse/HDFS-8413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15935393#comment-15935393 ]
Erik Krogen commented on HDFS-8413: ----------------------------------- 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-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org