hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ronghai.ma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-6491) add limit function at ClientScanner
Date Wed, 01 Aug 2012 19:58:02 GMT

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

ronghai.ma commented on HBASE-6491:
-----------------------------------

    public Result[] limit(int start, int nbRows){
      ArrayList<Result> resultList = new ArrayList<Result>(nbRows);
      for(int i = 1;i < start && next() != null; i++);
      Result next = null;
      for(int i = 0; i < nbRows && (next = next()) != null; i++){
        resultList.add(next);
      }
      return resultList.toArray(new Result[resultList.size()]);
    }
                
> add limit function at ClientScanner
> -----------------------------------
>
>                 Key: HBASE-6491
>                 URL: https://issues.apache.org/jira/browse/HBASE-6491
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: ronghai.ma
>         Attachments: ClientScanner.txt
>
>
> Get N rows from START row number.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message