HBASE-24693 regioninfo#isLast() should point to EMPTY_END_ROW (readability improvement)

Closes #2051

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
Bo Cui 2020-07-14 15:38:23 +05:30 committed by Viraj Jasani
parent 3bd54217a0
commit d132c4b53d
No known key found for this signature in database
GPG Key ID: B3D6C0B41C8ADFD5
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}
/**

View File

@ -615,7 +615,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