[ https://issues.apache.org/jira/browse/HADOOP-16685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16967816#comment-16967816 ]
Sahil Takiar commented on HADOOP-16685: --------------------------------------- {quote}What is the expectation? a fast failure? {quote} Yup. Expectation is that calling {{FileSystem#listStatusIterator(final Path p)}} on a {{Path}} that does not exist should throw a {{FileNotFoundException}}, which is consistent with what the current javadocs say + what {{listFiles}} does as well. Currently, {{listStatusIterator}} fails on the first call to {{hasNext()}} if the specified {{Path}} does not exist. {quote}does this break with other file systems other than ABFS? {quote} Technically it affects all filesystems, except maybe those that have a custom implementation of {{FileSystem#listStatusIterator(final Path p)}}. It only happens to affect Impala-on-ABFS, because Impala uses different APIs for listing out directories depending on the target filesystem - e.g. for S3 it uses {{listFiles(recursive)}} because S3A has a more performant way to do recursive listings. > FileSystem#listStatusIterator does not check if given path exists > ----------------------------------------------------------------- > > Key: HADOOP-16685 > URL: https://issues.apache.org/jira/browse/HADOOP-16685 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Reporter: Sahil Takiar > Assignee: Sahil Takiar > Priority: Major > > The Javadocs of FileSystem#listStatusIterator(final Path p) state that it > "@throws FileNotFoundException if <code>p</code> does not exist". However, > that does not seem to be the case. The method simply creates a > DirListingIterator which doesn't do an existence check. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org