hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anoop John <anoop.hb...@gmail.com>
Subject Re: Question on writing scan coprocessors
Date Fri, 29 Apr 2016 05:45:36 GMT
Different ways there for you to achieve

1. preScannerOpen -> Here u will get Scan object. You can add a new
Filter into the Scan  object and pass the Scan object (or the
attribute you look for) into this Filter.  The later scan op will use
this Filter and within that u can do filter of cells.

2. postScannerOpen -> Use this hook.  Here the RegionScanner is
already been made and u will get it passed to this hook. Also u have
the Scan object.  Create a wrapper for the scanner and return that
wrapper object from this hook.. Within the wrapper u can pass the Scan
attribute.   Use the wrapped scanner instance for the real next()
ops..  On the returned cells do the filtering ops


On Thu, Apr 28, 2016 at 4:06 AM, James Johansville
<james.johansville@gmail.com> wrote:
> Hello,
> I'd like to write a similar coprocessor to the example
> RegionObserverExample at
> http://www.3pillarglobal.com/insights/hbase-coprocessors  : that is, a scan
> coprocessor which intercepts and selectively filters scan results.
> My problem is, I need to be able to filter out Results based on a Scan
> attribute. preScannerNext() as used in above example does not allow for
> this, as Scan object is not passed down to the method.
> Any guidance on how to accomplish this?
> Thanks,
> James

View raw message