You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by vj...@apache.org on 2020/07/14 10:14:09 UTC
[hbase] branch branch-2 updated: HBASE-24693 regioninfo#isLast()
should point to EMPTY_END_ROW (readability improvement)
This is an automated email from the ASF dual-hosted git repository.
vjasani pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new 44d3519 HBASE-24693 regioninfo#isLast() should point to EMPTY_END_ROW (readability improvement)
44d3519 is described below
commit 44d351915a8df8605147d2c3c50acf3354bad676
Author: Bo Cui <cu...@163.com>
AuthorDate: Tue Jul 14 15:38:23 2020 +0530
HBASE-24693 regioninfo#isLast() should point to EMPTY_END_ROW (readability improvement)
Closes #2051
Signed-off-by: Duo Zhang <zh...@apache.org>
Signed-off-by: Viraj Jasani <vj...@apache.org>
---
.../src/main/java/org/apache/hadoop/hbase/client/RegionInfo.java | 2 +-
hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfo.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfo.java
index a6d1652..dbda4a5 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfo.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfo.java
@@ -768,7 +768,7 @@ public interface RegionInfo extends Comparable<RegionInfo> {
* @return True if this is last Region in Table
*/
default boolean isLast() {
- return Bytes.equals(getEndKey(), HConstants.EMPTY_START_ROW);
+ return Bytes.equals(getEndKey(), HConstants.EMPTY_END_ROW);
}
/**
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
index 57c81df..8196e51 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
@@ -643,7 +643,7 @@ public final class HConstants {
/**
* Last row in a table.
*/
- public static final byte [] EMPTY_END_ROW = EMPTY_START_ROW;
+ public static final byte [] EMPTY_END_ROW = EMPTY_BYTE_ARRAY;
/**
* Used by scanners and others when they're trying to detect the end of a