From 35889cbc014a91520df5588d9a3810d0c47fa6a6 Mon Sep 17 00:00:00 2001 From: Pankaj Kumar Date: Thu, 1 Sep 2016 18:34:26 +0800 Subject: [PATCH] HBASE-16498, NPE when Scan's stopRow is set NULL --- .../src/main/java/org/apache/hadoop/hbase/client/Scan.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java index ee3ed43..bfb79a0 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java @@ -48,8 +48,8 @@ import org.apache.hadoop.hbase.util.Bytes; *

* All operations are identical to {@link Get} with the exception of * instantiation. Rather than specifying a single row, an optional startRow - * and stopRow may be defined. If rows are not specified, the Scanner will - * iterate over all rows. + * and stopRow can be defined. NULL value is undefined for startRow and stopRow. + * If rows are not specified, the Scanner will iterate over all rows. *

* To get all columns from all rows of a Table, create an instance with no constraints; use the * {@link #Scan()} constructor. To constrain the scan to specific column families, @@ -189,7 +189,7 @@ public class Scan extends Query { *

* If the specified row does not exist, the Scanner will start from the * next closest row after the specified row. - * @param startRow row to start scanner at or after + * @param startRow row to start scanner at or after, NULL value is undefined */ public Scan(byte [] startRow) { this.startRow = startRow; @@ -197,8 +197,8 @@ public class Scan extends Query { /** * Create a Scan operation for the range of rows specified. - * @param startRow row to start scanner at or after (inclusive) - * @param stopRow row to stop scanner before (exclusive) + * @param startRow row to start scanner at or after (inclusive), NULL value is undefined + * @param stopRow row to stop scanner before (exclusive), NULL value is undefined */ public Scan(byte [] startRow, byte [] stopRow) { this.startRow = startRow; @@ -371,7 +371,7 @@ public class Scan extends Query { *

* If the specified row does not exist, the Scanner will start from the * next closest row after the specified row. - * @param startRow row to start scanner at or after + * @param startRow row to start scanner at or after, NULL value is undefined * @return this */ public Scan setStartRow(byte [] startRow) { @@ -381,7 +381,7 @@ public class Scan extends Query { /** * Set the stop row of the scan. - * @param stopRow row to end at (exclusive) + * @param stopRow row to end at (exclusive), NULL value is undefined *

* The scan will include rows that are lexicographically less than * the provided stopRow. -- 2.7.2.windows.1