hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lars hofhansl <lhofha...@yahoo.com>
Subject Re: Need to fast-forward a scanner inside a coprocessor
Date Fri, 03 Aug 2012 21:05:39 GMT
We recently added a new API for that:
RegionScanner.reseek(...). See HBASE-5520. 0.94+ only, unfortunately.

So it depends specifically on where you hook this up. If you do it at RegionObserver.postScannerOpen
you can reseek forward at any time.


-- Lars



----- Original Message -----
From: Tom Brown <tombrown52@gmail.com>
To: user@hbase.apache.org
Cc: 
Sent: Friday, August 3, 2012 1:27 PM
Subject: Need to fast-forward a scanner inside a coprocessor

I have a custom coprocessor that aggregates a selection of records
from the table based various criteria. For efficiency, I would like to
make it skip a bunch of records. For example, if I don't need any
"AAAA" records and I encounter "AAAA0000", I would like to tell it to
skip everything until "AAAB.."

I don't see any methods of the InternalScanner class that would give
me that ability. Do I need to close the current scanner and open a new
one? Does that add significant overhead (which would reduce any gains
achieved by skipping small numbers of records)?

I am using HBase 0.92. Upgrading to 0.94 is possible if it gives this
functionality.

--Tom


Mime
View raw message