From a9526f6fdb12efc7d6195185cfc2c8e6aa927af1 Mon Sep 17 00:00:00 2001 From: tedyu Date: Thu, 27 Oct 2016 08:47:24 -0700 Subject: [PATCH] HBASE-16886 hbase-client: scanner with reversed=true and small=true gets no result - addendum fixes reference to MAX_BYTE_ARRAY --- .../apache/hadoop/hbase/client/ClientSmallReversedScanner.java | 2 +- .../java/org/apache/hadoop/hbase/client/ConnectionUtils.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientSmallReversedScanner.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientSmallReversedScanner.java index 8fbacbf0204..ffa8af78cb4 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientSmallReversedScanner.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientSmallReversedScanner.java @@ -321,7 +321,7 @@ public class ClientSmallReversedScanner extends ReversedClientScanner { && (localStartKey == null || Bytes.equals(localStartKey, HConstants.EMPTY_BYTE_ARRAY))) { // HBASE-16886: if not setting startRow, then we will use a range [MAX_BYTE_ARRAY, +oo) to // locate a region list, and the last one in region list is the region where our scan start. - locateStartRow = ClientScanner.MAX_BYTE_ARRAY; + locateStartRow = ConnectionUtils.MAX_BYTE_ARRAY; } scan.setStartRow(localStartKey); diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java index e0030e81bb7..42d5ce8b04c 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java @@ -230,7 +230,7 @@ public final class ConnectionUtils { // A byte array in which all elements are the max byte, and it is used to // construct closest front row - static byte[] MAX_BYTE_ARRAY = Bytes.createMaxByteArray(9); + public static byte[] MAX_BYTE_ARRAY = Bytes.createMaxByteArray(9); /** * Create the closest row after the specified row