[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-16 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on HBASE-4197:
--

@Andrew: The change generally is neutral in terms of behavior (mostly interface 
changes). The only case that I missed was that instanceof also guards again 
null.
Or are you referring to Todd's request (recently on the dev mailing list) to 
have changes bake for a few days before they are committed?


> 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
>Assignee: Lars Hofhansl
> Attachments: 4197-bigger.txt, 4197-test.diff, 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-16 Thread Ted Yu (JIRA)

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

Ted Yu commented on HBASE-4197:
---

@Andrew:
You meant this: Added check of scanner against null, right ?
If you have a better way of handling null pointer in 
HRegionServer$QosFunction.apply(), please share.

> 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
>Assignee: Lars Hofhansl
> Attachments: 4197-bigger.txt, 4197-test.diff, 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-16 Thread Andrew Purtell (JIRA)

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

Andrew Purtell commented on HBASE-4197:
---

This was committed too quickly.

> 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
>Assignee: Lars Hofhansl
> Attachments: 4197-bigger.txt, 4197-test.diff, 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-15 Thread Hudson (JIRA)

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

Hudson commented on HBASE-4197:
---

Integrated in HBase-TRUNK #2117 (See 
[https://builds.apache.org/job/HBase-TRUNK/2117/])
HBASE-4197 Added check of scanner against null

tedyu : 
Files : 
* 
/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java


> 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
>Assignee: Lars Hofhansl
> Attachments: 4197-bigger.txt, 4197-test.diff, 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-15 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on HBASE-4197:
--

This really look transient to me.

> 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
>Assignee: Lars Hofhansl
> Attachments: 4197-bigger.txt, 4197-test.diff, 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-15 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on HBASE-4197:
--

Huh... 11 new failures from the test change? I am not closing the 
CustomScanner, but I don't think that can cause the new failures.


> 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
>Assignee: Lars Hofhansl
> Attachments: 4197-bigger.txt, 4197-test.diff, 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-15 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on HBASE-4197:
--

Ah yes. I missed the   null instanceof X == false   case. Thanks again Ted.
The other two instanceof cases are already guarded against null, so all is good 
now.


> 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
>Assignee: Lars Hofhansl
> Attachments: 4197-bigger.txt, 4197-test.diff, 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-15 Thread Hudson (JIRA)

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

Hudson commented on HBASE-4197:
---

Integrated in HBase-TRUNK #2116 (See 
[https://builds.apache.org/job/HBase-TRUNK/2116/])
HBASE-4197 TestCoprocessorInterface demonstrates CustomScanner usage

tedyu : 
Files : 
* 
/hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java


> 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
>Assignee: Lars Hofhansl
> Attachments: 4197-bigger.txt, 4197-test.diff, 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-15 Thread Ted Yu (JIRA)

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

Ted Yu commented on HBASE-4197:
---

The test failure of TestScannerTimeout wasn't transient.
Here is why:
{code}
java.lang.NullPointerException
at 
org.apache.hadoop.hbase.regionserver.HRegionServer$QosFunction.apply(HRegionServer.java:455)
at 
org.apache.hadoop.hbase.regionserver.HRegionServer$QosFunction.apply(HRegionServer.java:406)
{code}
I have checked in an addendum that fixes the NPE. TestScannerTimeout passes on 
my laptop with the fix.

> 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
>Assignee: Lars Hofhansl
> Attachments: 4197-bigger.txt, 4197-test.diff, 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-15 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on HBASE-4197:
--

There are 7 new failures. They all look transient. I'll have a more detailed 
look tomorrow.

> 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
>Assignee: Lars Hofhansl
> Attachments: 4197-bigger.txt, 4197-test.diff, 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-15 Thread Hudson (JIRA)

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

Hudson commented on HBASE-4197:
---

Integrated in HBase-TRUNK #2115 (See 
[https://builds.apache.org/job/HBase-TRUNK/2115/])
HBASE-4197  RegionServer expects all scanner to be subclasses of
   HRegion.RegionScanner (Lars Hofhansl)

tedyu : 
Files : 
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
* 
/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
* 
/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
* 
/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
* 
/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScanner.java
* /hbase/trunk/CHANGES.txt
* 
/hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
* 
/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
* 
/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
* 
/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java


> 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
>Assignee: Lars Hofhansl
> Attachments: 4197-bigger.txt, 4197-test.diff, 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-15 Thread Ted Yu (JIRA)

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

Ted Yu commented on HBASE-4197:
---

It passed for me as well.
Integrated to TRUNK.

> 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
>Assignee: Lars Hofhansl
> Attachments: 4197-bigger.txt, 4197-test.diff, 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-15 Thread Ted Yu (JIRA)

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

Ted Yu commented on HBASE-4197:
---

Integrated to TRUNK.
I wrapped the long line in RegionScanner.java

Thanks for the patch Lars.
Thanks for the review Andy and Mingjie.

> 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
>Assignee: 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-15 Thread jirapos...@reviews.apache.org (JIRA)

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

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


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

Ship it!


- Andrew


On 2011-08-15 21:21:59, 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-15 21:21:59)
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 coprocessors 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
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 1157388 
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
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
 1157388 
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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-15 Thread jirapos...@reviews.apache.org (JIRA)

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

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


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


I saw you have a test case posted to jira as attachment -- ScannerTest.java. 
Are you gonna make it part of this patch? 

The patch looks good to me. 


http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScanner.java


This line has > 80 characters. Can you wrap it? 


- Mingjie


On 2011-08-15 21:21:59, 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-15 21:21:59)
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 coprocessors 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
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 1157388 
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
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
 1157388 
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 {
> 

[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-15 Thread jirapos...@reviews.apache.org (JIRA)

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

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


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

(Updated 2011-08-15 21:21:59.072725)


Review request for hbase, Ted Yu and Mingjie Lai.


Summary (updated)
---

1. Don't require custom scanners created by coprocessors to be subclasses of 
HRegion.RegionScanner (see HBASE-4197).
2. Simplify the interfaces for Scanners in HRegion, HRegionServer, and 
RegionObserver. This avoids a bunch instanceof checks and casts to 
HRegion.RegionScanner.

(Sorry HBase-git would not accept my patch)


This addresses bug HBASE-4197.
https://issues.apache.org/jira/browse/HBASE-4197


Diffs
-

  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
 1157388 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
 1157388 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 1157388 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 1157388 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 1157388 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScanner.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
 1157388 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
 1157388 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
 1157388 

Diff: https://reviews.apache.org/r/1496/diff


Testing
---

Manual test attached to the bug.


Thanks,

Lars



> 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-14 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on HBASE-4197:
--

Yeah! :)

@Ted: Will you commit the patch attached to the review?

Note that this changes the externally visible interface of Coprocessors 
(RegionScanner instead of InternalScanner)... Just calling this out, so that 
there are no surprises later.


> 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-14 Thread jirapos...@reviews.apache.org (JIRA)

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

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


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

Ship it!


- Ted


On 2011-08-14 18:39:53, 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-14 18:39:53)
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
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 1157388 
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
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
 1157388 
bq.
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
 1157388 
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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-14 Thread jirapos...@reviews.apache.org (JIRA)

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

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


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

(Updated 2011-08-14 18:39:53.875778)


Review request for hbase, Ted Yu and Mingjie Lai.


Summary
---

1. Don't require custom scanners created by conprocessors to be subclasses of 
HRegion.RegionScanner (see HBASE-4197).
2. Simplify the interfaces for Scanners in HRegion, HRegionServer, and 
RegionObserver. This avoids a bunch instanceof checks and casts to 
HRegion.RegionScanner.

(Sorry HBase-git would not accept my patch)


This addresses bug HBASE-4197.
https://issues.apache.org/jira/browse/HBASE-4197


Diffs (updated)
-

  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
 1157388 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
 1157388 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 1157388 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 1157388 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 1157388 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScanner.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
 1157388 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
 1157388 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
 1157388 

Diff: https://reviews.apache.org/r/1496/diff


Testing
---

Manual test attached to the bug.


Thanks,

Lars



> 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-13 Thread jirapos...@reviews.apache.org (JIRA)

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

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


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



http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java


I need to change the javadoc to say RegionScanner as well.


- Lars


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} 

--

[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-13 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on HBASE-4197:
--

Thanks Ted... Installed the formatter. I will wait for some more feedback and 
then upload a new version.

> 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-13 Thread Ted Yu (JIRA)

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

Ted Yu commented on HBASE-4197:
---

See http://hbase.apache.org/book.html#eclipse which would tell you where to 
find formatter for Eclipse.

> 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-13 Thread jirapos...@reviews.apache.org (JIRA)

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

jirapos...@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


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 gener

[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-13 Thread jirapos...@reviews.apache.org (JIRA)

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

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


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

(Updated 2011-08-13 15:56:28.746919)


Review request for hbase, Ted Yu and Mingjie Lai.


Summary
---

1. Don't require custom scanners created by conprocessors to be subclasses of 
HRegion.RegionScanner (see HBASE-4197).
2. Simplify the interfaces for Scanners in HRegion, HRegionServer, and 
RegionObserver. This avoids a bunch instanceof checks and casts to 
HRegion.RegionScanner.

(Sorry HBase-git would not accept my patch)


This addresses bug HBASE-4197.
https://issues.apache.org/jira/browse/HBASE-4197


Diffs
-

  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScanner.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
 1157311 

Diff: https://reviews.apache.org/r/1496/diff


Testing
---

Manual test attached to the bug.


Thanks,

Lars



> 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-13 Thread Ted Yu (JIRA)

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

Ted Yu commented on HBASE-4197:
---

Please specify hbase for Groups on review board so that more people can see the 
review request.
Good job Lars.

> 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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-12 Thread jirapos...@reviews.apache.org (JIRA)

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

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


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

(Updated 2011-08-13 04:38:38.030763)


Review request for Ted Yu and Mingjie Lai.


Summary (updated)
---

1. Don't require custom scanners created by conprocessors to be subclasses of 
HRegion.RegionScanner (see HBASE-4197).
2. Simplify the interfaces for Scanners in HRegion, HRegionServer, and 
RegionObserver. This avoids a bunch instanceof checks and casts to 
HRegion.RegionScanner.

(Sorry HBase-git would not accept my patch)


This addresses bug HBASE-4197.
https://issues.apache.org/jira/browse/HBASE-4197


Diffs
-

  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScanner.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
 1157311 

Diff: https://reviews.apache.org/r/1496/diff


Testing
---

Manual test attached to the bug.


Thanks,

Lars



> 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-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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-12 Thread jirapos...@reviews.apache.org (JIRA)

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

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


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

Review request for Ted Yu and Mingjie Lai.


Summary
---

1. Don't require custom scanners created by conprocessors to be subclasses of 
HRegion.RegionScanner (see HBASE-4197).
2. Simplify the interfaces for Scanners in HRegion, HRegionServer, and 
RegionObserver. This avoids a bunch instanceof checks and casts to 
HRegion.RegionScanner.

(Sorry HBase-git would accept my patch)


This addresses bug HBASE-4197.
https://issues.apache.org/jira/browse/HBASE-4197


Diffs
-

  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScanner.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
 1157311 
  
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
 1157311 

Diff: https://reviews.apache.org/r/1496/diff


Testing
---

Manual test attached to the bug.


Thanks,

Lars



> 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-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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-12 Thread Ted Yu (JIRA)

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

Ted Yu commented on HBASE-4197:
---

+1 on patch version 2.
Please use review board to get more feedback.

> 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-bigger.txt, 4197-v2.txt, 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(...):
> {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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-12 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on HBASE-4197:
--

Renamed getRegionName() to getRegionInfo().
Also cleaned up some more comments, and removed all references to
InternalScanner from HRegionServer and HRegion (there were only 3 or 4 left 
anyway).


> 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-bigger.txt, 4197-v2.txt, 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(...):
> {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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-12 Thread Ted Yu (JIRA)

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

Ted Yu commented on HBASE-4197:
---

I like the cleaner code after the change.
I know the following existed prior to your patch:
{code}
+public HRegionInfo getRegionName();
{code}
Can we rename the method to getRegionInfo ?
This would make the following code a little easier to understand:
{code}
region = getRegion(rs.getRegionName().getRegionName());
{code}

Thanks for your effort, Lars.

> 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-bigger.txt, 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(...):
> {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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-12 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on HBASE-4197:
--

Thanks.

I am working on a bigger patch that avoids all the casting and instanceof 
checking w.r.t. scanners in HRegionServer/etc.

> 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(...):
> {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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-12 Thread Mingjie Lai (JIRA)

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

Mingjie Lai commented on HBASE-4197:


Lars. 

I'm not aware of any existing document regarding reviewboard usage for hbase. 
You need to create an account at https://reviews.apache.org, and create a new 
review request. 

repository: hbase-git (since I use git)
group: hbase

It should be pretty straight forward to use. 

About coding conversion: http://hbase.apache.org/book.html#eclipse

-mingjie

> 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(...):
> {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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-12 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on HBASE-4197:
--

Hey Mingjie,

how do I do that? Is there some documentation where I can read about the 
process?

Thanks.

-- Lars





> 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(...):
> {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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-12 Thread Mingjie Lai (JIRA)

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

Mingjie Lai commented on HBASE-4197:


@lars 

Yes, RegionScanner'd better to be an interface instead of a class for better 
extension. Overall the patch looks good to me. 

Can you finish the patch and post it to reviewboard? 

> 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(...):
> {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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-12 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on HBASE-4197:
--

And of course if we'll go this route, I'll comments, Copyright notices, etc.

> 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(...):
> 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.");
>   }

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




[jira] [Commented] (HBASE-4197) RegionServer expects all scanner to be subclasses of HRegion.RegionScanner

2011-08-12 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on HBASE-4197:
--

I attached a minimal patch that makes it work for me.
I am not happy with the patch, though, for two reason:
1. isFilterDone() now needs to be public.
2. If the regionserver can only ever deal with RegionScanners, maybe all the 
interfaces in coprocessors should also take RegionScanner instead.

> 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(...):
> 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.");
>   }

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