You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Ashu Pachauri (JIRA)" <ji...@apache.org> on 2016/11/09 21:26:58 UTC

[jira] [Comment Edited] (HBASE-16498) NPE when Scan's stopRow is set NULL

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

Ashu Pachauri edited comment on HBASE-16498 at 11/9/16 9:26 PM:
----------------------------------------------------------------

As pointed out in HBASE-17031, this happens also when setting startRow to null,  and we fail there way down in the call stack which is not an easily debuggable scenario. Adding to the javadoc does not give us anything, because almost no one sets start/stop row to null deliberately, it mostly happens during an automated process.
Shouldn't we just do a null check whenever we construct a new scanner?


was (Author: ashu210890):
As pointed out in HBASE-17031, this happens also when setting startRow to null,  and we fail there way down in the call stack which is not an easily debuggable scenario. Adding to the javadoc does not given anything, because almost no one sets start/stop row to null deliberately, it mostly happens during an automated process.
Shouldn't we just do a null check whenever we construct a new scanner?

> NPE when Scan's stopRow is set NULL
> -----------------------------------
>
>                 Key: HBASE-16498
>                 URL: https://issues.apache.org/jira/browse/HBASE-16498
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 2.0.0, 1.3.0, 1.4.0, 1.1.6, 1.2.3
>            Reporter: Pankaj Kumar
>            Assignee: Pankaj Kumar
>            Priority: Minor
>         Attachments: HBASE-16498-V2.patch, HBASE-16498-V3.patch, HBASE-16498.patch
>
>
> During scan operation we validate whether this is the last region of table, if not then records will be retrieved from nextscanner. If stop row is set null then NPE will be thrown while validating stop row with region endkey.
> {noformat}
> java.lang.NullPointerException
> 	at org.apache.hadoop.hbase.client.ClientScanner.checkScanStopRow(ClientScanner.java:217)
> 	at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:266)
> 	at org.apache.hadoop.hbase.client.ClientScanner.possiblyNextScanner(ClientScanner.java:237)
> 	at org.apache.hadoop.hbase.client.ClientScanner.loadCache(ClientScanner.java:537)
> 	at org.apache.hadoop.hbase.client.ClientScanner.nextWithSyncCache(ClientScanner.java:363)
> 	at org.apache.hadoop.hbase.client.ClientSimpleScanner.next(ClientSimpleScanner.java:50)
> 	at org.apache.hadoop.hbase.client.AbstractClientScanner.next(AbstractClientScanner.java:70)
> 	at org.apache.hadoop.hbase.client.TestAdmin2.testScanWithSplitKeysAndNullStartEndRow(TestAdmin2.java:803)
> {noformat}
> We should return empty byte array when start/end row is set NULL.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)