[ 
https://issues.apache.org/jira/browse/HBASE-3583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008305#comment-13008305
 ] 

stack commented on HBASE-3583:
------------------------------

Mingie: I commented over on rb.  I'm w/ Gary thinking #3 could work.  Just keep 
it as InternalScanner everywhere, in particular as return out of getScanner but 
then internally doc. why its so ugly.  Do the instanceof test and if not as 
expected, throw ugly exception.  I think this least intrusive route and you CYA 
with comments on why it is the way it is and that should be changed when we 
have some elbow room for API changing (though, thinking on it, we have elbow 
room?  This comes out in 0.92 -- don't we break interfaces in 0.92?  I haven't 
checked)

> 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
>
>         Attachments: HBase3583.patch
>
>
> 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

Reply via email to