hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Daniel Cryans <jdcry...@apache.org>
Subject Re: SOS! No data returned using scan in region server side
Date Mon, 13 Feb 2012 22:30:31 GMT
So is the issue that you are getting the Results back but they only
have row keys or is it that you don't get any Result? Either way,
double check your code.

J-D

On Mon, Feb 13, 2012 at 12:23 AM, 史英杰 <shiyingjie1983@gmail.com> wrote:
> When modifying the source code of HBase, I met a problem. In the
> regionserver side of HBase , I want to use the function scan to get
> all the data in the specified region. In the region, there are more
> than one version of data that match one rowkey. the code is shown
> below:
>
>   Scan scan = new Scan(range.getStartRow());
>    scan.setMaxVersions(range.getMaxVersions());
>    long scannerId = this.openScanner(range.getRegionName(), scan);
>    int nbRows = Integer.parseInt(new String(range.getEndRow())) -
> Integer.parseInt(new String(range.getStartRow()));
>    Result[] results = this.next(scannerId, nbRows);
>
> But the problem is that,  after getting the results that returned by
> "this.next( )", I found that for every rowkey there is no data
> returned.
> The functions openScanner() and next() are called by the client side
> function getScanner. Why I get no data?
> Thank you very much.
>
> Yu Zhang

Mime
View raw message