hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jiraposter@reviews.apache.org (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner
Date Sat, 13 Aug 2011 19:27:29 GMT

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

jiraposter@reviews.apache.org commented on HBASE-4197:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1496/#review1446
-----------------------------------------------------------



http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScanner.java
<https://reviews.apache.org/r/1496/#comment3351>

    Tab should be 2 spaces.


- Ted


On 2011-08-13 15:56:28, Lars Hofhansl wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1496/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-08-13 15:56:28)
bq.  
bq.  
bq.  Review request for hbase, Ted Yu and Mingjie Lai.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  1. Don't require custom scanners created by conprocessors to be subclasses of HRegion.RegionScanner
(see HBASE-4197).
bq.  2. Simplify the interfaces for Scanners in HRegion, HRegionServer, and RegionObserver.
This avoids a bunch instanceof checks and casts to HRegion.RegionScanner.
bq.  
bq.  (Sorry HBase-git would not accept my patch)
bq.  
bq.  
bq.  This addresses bug HBASE-4197.
bq.      https://issues.apache.org/jira/browse/HBASE-4197
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
1157311 
bq.    http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
1157311 
bq.    http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
1157311 
bq.    http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
1157311 
bq.    http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
1157311 
bq.    http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScanner.java
PRE-CREATION 
bq.    http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
1157311 
bq.    http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
1157311 
bq.    http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
1157311 
bq.  
bq.  Diff: https://reviews.apache.org/r/1496/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Manual test attached to the bug.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Lars
bq.  
bq.



> RegionServer expects all scanner to be subclasses of HRegion.RegionScanner
> --------------------------------------------------------------------------
>
>                 Key: HBASE-4197
>                 URL: https://issues.apache.org/jira/browse/HBASE-4197
>             Project: HBase
>          Issue Type: Bug
>          Components: coprocessors
>    Affects Versions: 0.92.0
>            Reporter: Lars Hofhansl
>         Attachments: 4197-bigger.txt, 4197-v2.txt, 4197.txt, ScannerTest.java
>
>
> Returning just an InternalScanner from RegionObsever.{pre|post}OpenScanner leads to the
following exception when using the scanner.
> java.io.IOException: InternalScanner implementation is expected to be HRegion.RegionScanner.
>         at org.apache.hadoop.hbase.regionserver.HRegionServer.next(HRegionServer.java:2023)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:616)
>         at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:314)
>         at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1225)
> The problem is in HRegionServer.next(...):
> {code} 
>     InternalScanner s = this.scanners.get(scannerName);
> ...
>       // Call coprocessor. Get region info from scanner.
>       HRegion region = null;
>       if (s instanceof HRegion.RegionScanner) {
>         HRegion.RegionScanner rs = (HRegion.RegionScanner) s;
>         region = getRegion(rs.getRegionName().getRegionName());
>       } else {
>         throw new IOException("InternalScanner implementation is expected " +
>             "to be HRegion.RegionScanner.");
>       }
> {code} 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message