You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "ronghai.ma (JIRA)" <ji...@apache.org> on 2012/08/01 21:58:02 UTC

[jira] [Commented] (HBASE-6491) add limit function at ClientScanner

    [ 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