@InterfaceAudience.Private static class RegionInfoBuilder.MutableRegionInfo extends Object implements 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) |
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() |
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, wait
areAdjacent, 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, toDelimitedByteArray
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
private 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 RegionInfo
public long getRegionId()
getRegionId
in interface RegionInfo
public byte[] getRegionName()
getRegionName
in interface RegionInfo
getRegionNameAsString()
public String getRegionNameAsString()
getRegionNameAsString
in interface RegionInfo
public String getEncodedName()
getEncodedName
in interface RegionInfo
public byte[] getEncodedNameAsBytes()
getEncodedNameAsBytes
in interface RegionInfo
public byte[] getStartKey()
getStartKey
in interface RegionInfo
public byte[] getEndKey()
getEndKey
in interface RegionInfo
public TableName getTable()
getTable
in interface RegionInfo
public boolean containsRange(byte[] rangeStartKey, byte[] rangeEndKey)
containsRange
in interface RegionInfo
IllegalArgumentException
- if the range passed is invalid (ie. end < start)public boolean containsRow(byte[] row)
containsRow
in interface RegionInfo
public boolean isMetaRegion()
isMetaRegion
in interface RegionInfo
public boolean isSplit()
isSplit
in interface RegionInfo
public RegionInfoBuilder.MutableRegionInfo setSplit(boolean split)
split
- set split statuspublic boolean isOffline()
isOffline
in interface RegionInfo
public RegionInfoBuilder.MutableRegionInfo setOffline(boolean offLine)
offLine
- Set online/offline status.public boolean isSplitParent()
isSplitParent
in interface RegionInfo
public int getReplicaId()
getReplicaId
in interface RegionInfo
public String toString()
toString
in class Object
Object.toString()
public boolean equals(Object o)
equals
in class Object
o
- Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.