[
https://issues.apache.org/jira/browse/HBASE-4197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lars Hofhansl updated HBASE-4197:
---------------------------------
Description:
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(...):
{{monospaced}}
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.");
}
{{monospaced}}
was:
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(...):
{{
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.");
}
}}
> 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
> Affects Versions: 0.92.0
> Reporter: Lars Hofhansl
> Attachments: 4197.txt
>
>
> 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(...):
> {{monospaced}}
> 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.");
> }
> {{monospaced}}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira