[
https://issues.apache.org/jira/browse/HBASE-5517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225624#comment-13225624
]
Andrew Purtell commented on HBASE-5517:
---------------------------------------
You should be able to achieve what you want with a custom scanner that
implements RegionScanner.
Use the coprocessor preScannerOpen. In that hook, wrap the passed in
RegionScanner with an instance of a custom wrapper class that extends
RegionScanner, and return that instance of your scanner wrapper.
Then in your wrapper, in the implementation of next(List<KeyValue> result, int
limit), use a for loop to call next(List<KeyValue> results).
Then in your wrapper, in the implementation of next(List<KeyValue> results),
call reseek or whatever, and then call the next(List<KeyValue> results) method
of the scanner you are wrapping.
> Region Server Coprocessor : Suggestion for change when next() call with
> nbRows>1
> --------------------------------------------------------------------------------
>
> Key: HBASE-5517
> URL: https://issues.apache.org/jira/browse/HBASE-5517
> Project: HBase
> Issue Type: Improvement
> Components: coprocessors
> Affects Versions: 0.92.0
> Reporter: Anoop Sam John
>
> Originated from the discussion under HBASE-2038 [Coprocessor based IHBase]
> Currently preNext() and postNext() will be called once for a next() call into
> HRegionServer.
> But if the next() is being called with nbRows>1, co processor should provide
> a chance to do some operation before, after every next() calls into region as
> part of call next(int scannerId, int nbRows).
> In case of usage of coprocessor with IHBase, before making any calls of
> next() into a Region, we need to make a reseek() to a row based on the index
> information.
--
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