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

Suresh Srinivas commented on HADOOP-6692:
-----------------------------------------

Hairong, this is a good change.

In order to simplify transition to FileContext, should we retain the old 
FileContext.listStatus() method as it is and add iterative list status as 
listStatusIterator()? It also captures the semantics quite well.

Minor:
# FileContext.listStatus() that returns iterator -  add information about 
throwing UnsupportedOperationException and NoSuchElementException in the 
RuntimeExceptions section on attempt to delete an entry from iterator.
# FileContext.listStatus() that retuns array -  has invalid description in 
@return.  Also add a note to use the itertor version if the need is to iterate 
over the list, with a @link to the other method
# AFS.listStatusItertor() - method javadoc should point @link to the right 
method in FileContext.
# AFS.listStatus() - method javadoc should point @link to the right method in 
FileContext. Current link is invalid and is missing # prefix to listStatus().


> Propose change to FileContext#listStatus
> ----------------------------------------
>
>                 Key: HADOOP-6692
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6692
>             Project: Hadoop Common
>          Issue Type: Sub-task
>    Affects Versions: 0.22.0
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.22.0
>
>         Attachments: listStatusItor.patch
>
>
> Add a method  Iterator<FileStatus> listStatus(Path), which allows HDFS client 
> not to have the whole listing in the memory, benefit more from the iterative 
> listing added in HDFS-985. Move the current FileStatus[] listStatus(Path) to 
> be a utility method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to