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

Rakesh R commented on HDFS-11067:
---------------------------------

Thanks [~vinayrpet] for the patch. I could see {{Hdfs.java}} also has similar 
condition and has to be handled, isn't it?

[Hdfs.java#L229 code 
reference|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/fs/Hdfs.java#L229]

{code}
Hdfs.java
        // current listing is exhausted & fetch a new listing
        thisListing = dfs.listPaths(src, thisListing.getLastName(),
            needLocation);
        if (thisListing == null) {
          return false; // the directory is deleted
        }
{code}

> DFS#listStatusIterator(..) should throw FileNotFoundException if the 
> directory deleted before fetching next batch of entries
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-11067
>                 URL: https://issues.apache.org/jira/browse/HDFS-11067
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>            Reporter: Vinayakumar B
>            Assignee: Vinayakumar B
>         Attachments: HDFS-11067-01.patch, HDFS-11067-02.patch
>
>
> DFS#listStatusIterator(..) currently stops iterating silently when the 
> directory gets deleted before fetching the next batch of entries.
> It should throw FileNotFoundException() and let user know that file is 
> deleted in the middle.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to