@InterfaceAudience.Private static class RegionInfoBuilder.MutableRegionInfo extends Object implements RegionInfo, Comparable<RegionInfo>
| Modifier and Type | Field and Description |
|---|---|
private String |
encodedName |
private byte[] |
encodedNameAsBytes |
private byte[] |
endKey |
private int |
hashCode |
private boolean |
offLine
The 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| Modifier | Constructor and Description |
|---|---|
private |
MutableRegionInfo(long regionId,
TableName tableName,
int replicaId)
Private constructor used constructing MutableRegionInfo for the
first meta regions
|
(package private) |
MutableRegionInfo(TableName tableName,
byte[] startKey,
byte[] endKey,
boolean split,
long regionId,
int replicaId,
boolean offLine,
byte[] regionName) |
(package private) |
MutableRegionInfo(TableName tableName,
byte[] startKey,
byte[] endKey,
boolean split,
long regionId,
int replicaId,
boolean offLine,
byte[] regionName,
String encodedName) |
| 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) |
int |
compareTo(RegionInfo other) |
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() |
boolean |
isSplit() |
boolean |
isSplitParent() |
RegionInfoBuilder.MutableRegionInfo |
setOffline(boolean offLine)
The parent of a region split is offline while split daughters hold
references to the parent.
|
RegionInfoBuilder.MutableRegionInfo |
setSplit(boolean split) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitareAdjacent, 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, prettyPrint, toByteArray, toDelimitedByteArray, toDelimitedByteArrayprivate 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
private MutableRegionInfo(long regionId, TableName tableName, int replicaId)
MutableRegionInfo(TableName tableName, byte[] startKey, byte[] endKey, boolean split, long regionId, int replicaId, boolean offLine, byte[] regionName)
MutableRegionInfo(TableName tableName, byte[] startKey, byte[] endKey, boolean split, long regionId, int replicaId, boolean offLine, byte[] regionName, String encodedName)
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 RegionInfoBuilder.MutableRegionInfo setSplit(boolean split)
split - set split statuspublic boolean isOffline()
isOffline in interface RegionInfopublic RegionInfoBuilder.MutableRegionInfo setOffline(boolean offLine)
offLine - Set online/offline status.public boolean isSplitParent()
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 Objecto - Object.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public int compareTo(RegionInfo other)
compareTo in interface Comparable<RegionInfo>Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.