@InterfaceAudience.Private class MutableRegionInfo extends Object implements RegionInfo
RegionInfoBuilder creating instances of RegionInfos.| Modifier and Type | Field and Description | 
|---|---|
| private String | encodedName | 
| private byte[] | encodedNameAsBytes | 
| private byte[] | endKey | 
| private int | hashCode | 
| private static org.slf4j.Logger | LOG | 
| private static int | MAX_REPLICA_ID | 
| private boolean | offLineThe new format for a region name contains its encodedName at the end. | 
| private long | regionId | 
| private byte[] | regionName | 
| private int | replicaId | 
| private boolean | split | 
| private byte[] | startKey | 
| private TableName | tableName | 
COMPARATOR, DEFAULT_REPLICA_ID, ENC_SEPARATOR, INVALID_REGION_NAME_FORMAT_MESSAGE, MD5_HEX_LENGTH, REPLICA_ID_DELIMITER, REPLICA_ID_FORMAT, UNDEFINED| Constructor and Description | 
|---|
| MutableRegionInfo(long regionId,
                 TableName tableName,
                 int replicaId)Package private constructor used constructing MutableRegionInfo for the first meta regions | 
| MutableRegionInfo(TableName tableName,
                 byte[] startKey,
                 byte[] endKey,
                 boolean split,
                 long regionId,
                 int replicaId,
                 boolean offLine) | 
| Modifier and Type | Method and Description | 
|---|---|
| private static byte[] | checkEndKey(byte[] endKey) | 
| private static int | checkReplicaId(int regionId) | 
| private static byte[] | checkStartKey(byte[] startKey) | 
| private static TableName | checkTableName(TableName tableName) | 
| boolean | containsRange(byte[] rangeStartKey,
             byte[] rangeEndKey)Returns true if the given inclusive range of rows is fully contained
 by this region. | 
| boolean | containsRow(byte[] row)Return true if the given row falls in this region. | 
| boolean | equals(Object o) | 
| private static int | generateHashCode(TableName tableName,
                byte[] startKey,
                byte[] endKey,
                long regionId,
                int replicaId,
                boolean offLine,
                byte[] regionName) | 
| String | getEncodedName() | 
| byte[] | getEncodedNameAsBytes() | 
| byte[] | getEndKey() | 
| long | getRegionId() | 
| byte[] | getRegionName() | 
| String | getRegionNameAsString() | 
| int | getReplicaId()Returns the region replica id | 
| String | getShortNameToLog() | 
| byte[] | getStartKey() | 
| TableName | getTable()Get current table name of the region | 
| int | hashCode() | 
| boolean | isMetaRegion() | 
| boolean | isOffline()Deprecated. 
 since 3.0.0 and will be removed in 4.0.0 | 
| boolean | isSplit() | 
| boolean | isSplitParent()Deprecated. 
 since 3.0.0 and will be removed in 4.0.0, Use  isSplit()instead. | 
| MutableRegionInfo | setOffline(boolean offLine)The parent of a region split is offline while split daughters hold
 references to the parent. | 
| MutableRegionInfo | setSplit(boolean split) | 
| String | toString() | 
clone, finalize, getClass, notify, notifyAll, wait, wait, waitareAdjacent, compareTo, createMobRegionInfo, createRegionName, createRegionName, createRegionName, createRegionName, createRegionName, encodeRegionName, getRegionNameAsString, getRegionNameAsString, getShortNameToLog, getShortNameToLog, getStartKey, getTable, hasEncodedName, isAdjacent, isDegenerate, isEncodedRegionName, isFirst, isLast, isNext, isOverlap, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFromOrNull, parseFromOrNull, parseRegionName, parseRegionNameOrReturnNull, prettyPrint, toByteArray, toDelimitedByteArray, toDelimitedByteArrayprivate static final org.slf4j.Logger LOG
private static final int MAX_REPLICA_ID
private boolean offLine
**NOTE** The first hbase:meta region, and regions created by an older version of HBase (0.20 or prior) will continue to use the old region name format.
private boolean split
private final long regionId
private final int replicaId
private final byte[] regionName
private final byte[] startKey
private final byte[] endKey
private final int hashCode
private final String encodedName
private final byte[] encodedNameAsBytes
MutableRegionInfo(long regionId, TableName tableName, int replicaId)
MutableRegionInfo(TableName tableName, byte[] startKey, byte[] endKey, boolean split, long regionId, int replicaId, boolean offLine)
private static int generateHashCode(TableName tableName, byte[] startKey, byte[] endKey, long regionId, int replicaId, boolean offLine, byte[] regionName)
private static byte[] checkStartKey(byte[] startKey)
private static byte[] checkEndKey(byte[] endKey)
private static TableName checkTableName(TableName tableName)
private static int checkReplicaId(int regionId)
public String getShortNameToLog()
getShortNameToLog in interface RegionInfopublic long getRegionId()
getRegionId in interface RegionInfopublic byte[] getRegionName()
getRegionName in interface RegionInfogetRegionNameAsString()public String getRegionNameAsString()
getRegionNameAsString in interface RegionInfopublic String getEncodedName()
getEncodedName in interface RegionInfopublic byte[] getEncodedNameAsBytes()
getEncodedNameAsBytes in interface RegionInfopublic byte[] getStartKey()
getStartKey in interface RegionInfopublic byte[] getEndKey()
getEndKey in interface RegionInfopublic TableName getTable()
getTable in interface RegionInfopublic boolean containsRange(byte[] rangeStartKey, byte[] rangeEndKey)
containsRange in interface RegionInfoIllegalArgumentException - if the range passed is invalid (ie. end < start)public boolean containsRow(byte[] row)
containsRow in interface RegionInfopublic boolean isMetaRegion()
isMetaRegion in interface RegionInfopublic boolean isSplit()
isSplit in interface RegionInfopublic MutableRegionInfo setSplit(boolean split)
split - set split status@Deprecated public boolean isOffline()
isOffline in interface RegionInfopublic MutableRegionInfo setOffline(boolean offLine)
offLine - Set online/offline status.@Deprecated public boolean isSplitParent()
isSplit() instead.isSplitParent in interface RegionInfopublic int getReplicaId()
getReplicaId in interface RegionInfopublic String toString()
toString in class ObjectObject.toString()public boolean equals(Object o)
equals in class ObjectObject.equals(Object)public int hashCode()
hashCode in class ObjectObject.hashCode()Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.