hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mingjie Lai (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-3583) Coprocessors: RegionObserver: ScannerNext and ScannerClose hooks are called when get() is invoked
Date Wed, 02 Mar 2011 22:25:37 GMT

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

Mingjie Lai commented on HBASE-3583:
------------------------------------

After reviewed the current implementation, I think it makes more sense to pull the scannerNext
and scannerClose hooks from HRegion to HRegionServer, instead of using a flag to indicate
whether to invoke coprocessor hooks or not. Reason 1) the internalScanner are called at several
different places, there are potential misfires as this case; 2) it would be ugly to pass a
boolean flag to the internalscanner(it's an interface). 

Patch posted here and reviewboard. 
https://review.cloudera.org/r/1617/

> 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

        

Mime
View raw message