[ 
https://issues.apache.org/jira/browse/HDFS-13759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

wuchang updated HDFS-13759:
---------------------------
    Description: 
I could use *FileSystem*
{code:java}
RemoteIterator<FileStatus> listed = fs.listStatusIterator(new 
Path("hdfs://warehousestore/user/chang.wu/flat_level_1"));{code}
like this to get files *asynchronously*.

But in fact what I want is a pagination support, where I could pass two 
parameters, the 
{code:java}
offset{code}
and
{code:java}
limit{code}
, like MySQL does to get part of files under some directory;.

I know I could just implement the pagination by wrapping the 
*listStatusIterator*, but I think it looks weird.

So, why can't HDFS support pagination for user directly? 

  was:
I could use *FileSystem*
{code:java}
RemoteIterator<FileStatus> listed = fs.listStatusIterator(new 
Path("hdfs://warehousestore/user/chang.wu/flat_level_1"));{code}
like this to get files *asynchronously*.

But in fact what I want is a pagination support, where I could pass two 
parameters, the 
{code:java}
offset{code}
and
{code:java}
limit{code}
, like MySQL does to get part of files under some directory;.

I know I could just implement the pagination by wrapping the 
*listStatusIterator*, but I think it is inefficient by wrapping this iterator.

I wonder why cannot HDFS java Api support that?


> [HDFS Pagination]Does HDFS Java api Support Pagination?
> -------------------------------------------------------
>
>                 Key: HDFS-13759
>                 URL: https://issues.apache.org/jira/browse/HDFS-13759
>             Project: Hadoop HDFS
>          Issue Type: Wish
>          Components: fs, fs async
>    Affects Versions: 2.6.0, 2.7.0, 2.8.0
>            Reporter: wuchang
>            Priority: Major
>              Labels: HDFS, pagination
>
> I could use *FileSystem*
> {code:java}
> RemoteIterator<FileStatus> listed = fs.listStatusIterator(new 
> Path("hdfs://warehousestore/user/chang.wu/flat_level_1"));{code}
> like this to get files *asynchronously*.
> But in fact what I want is a pagination support, where I could pass two 
> parameters, the 
> {code:java}
> offset{code}
> and
> {code:java}
> limit{code}
> , like MySQL does to get part of files under some directory;.
> I know I could just implement the pagination by wrapping the 
> *listStatusIterator*, but I think it looks weird.
> So, why can't HDFS support pagination for user directly? 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to