hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 史英杰 <shiyingjie1...@gmail.com>
Subject SOS! No data returned using scan in region server side
Date Mon, 13 Feb 2012 08:23:42 GMT
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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message