You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Andrew Purtell (JIRA)" <ji...@apache.org> on 2011/03/01 21:26:37 UTC
[jira] Commented: (HBASE-3583) Coprocessors: RegionObserver:
ScannerNext and ScannerClose hooks are called when get() is invoked
[ https://issues.apache.org/jira/browse/HBASE-3583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001096#comment-13001096 ]
Andrew Purtell commented on HBASE-3583:
---------------------------------------
We discussed this internally. Reasonable options are:
1) Rework the Coprocessor RegionObserver API so "everything is a scan"
2) Pass booleans to internal functions to distinguish between the code paths
We are opting for #2. A feature of the RegionObserver API is it mirrors HRegionInterface so the user/implementor has precise options for overriding or augmenting client actions.
> Coprocessors: RegionObserver: ScannerNext and ScannerClose hooks are called when get() is invoked
> -------------------------------------------------------------------------------------------------
>
> Key: HBASE-3583
> URL: https://issues.apache.org/jira/browse/HBASE-3583
> Project: HBase
> Issue Type: Bug
> Components: coprocessors
> Affects Versions: 0.92.0
> Reporter: Mingjie Lai
> Assignee: Mingjie Lai
> Fix For: 0.92.0
>
>
> RegionObserver upcalls are expected to be triggered by corresponding client calls.
> I found that if a HTable.get() is issued, ScannerNext, and ScannerClose hooks are also invoked.
> Here is the reason: HRegion.get() is implemented with an internal scanner:
> {code}
> InternalScanner scanner = null;
> try {
> scanner = getScanner(scan);
> scanner.next(results);
> } finally {
> if (scanner != null)
> scanner.close();
> }
> {code}
> where scanner.next, and scanner.close() are implemented with RegionObserver hooks.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira