RegionInfoBuilder
to build RegionInfo
.@Deprecated @InterfaceAudience.Public public class HRegionInfo extends Object implements RegionInfo
Modifier and Type | Field and Description |
---|---|
static String |
ENCODED_REGION_NAME_REGEX
Deprecated.
A non-capture group so that this can be embedded.
|
static HRegionInfo |
FIRST_META_REGIONINFO
Deprecated.
HRegionInfo for first meta region
|
static byte[] |
HIDDEN_END_KEY
Deprecated.
|
static byte[] |
HIDDEN_START_KEY
Deprecated.
|
static String |
NO_HASH
Deprecated.
|
Constructor and Description |
---|
HRegionInfo(HRegionInfo other,
int replicaId)
Deprecated.
|
HRegionInfo(long regionId,
TableName tableName,
int replicaId)
Deprecated.
|
HRegionInfo(RegionInfo other)
Deprecated.
Costruct a copy of another HRegionInfo
|
HRegionInfo(TableName tableName)
Deprecated.
|
HRegionInfo(TableName tableName,
byte[] startKey,
byte[] endKey)
Deprecated.
Construct HRegionInfo with explicit parameters
|
HRegionInfo(TableName tableName,
byte[] startKey,
byte[] endKey,
boolean split)
Deprecated.
Construct HRegionInfo with explicit parameters
|
HRegionInfo(TableName tableName,
byte[] startKey,
byte[] endKey,
boolean split,
long regionid)
Deprecated.
Construct HRegionInfo with explicit parameters
|
HRegionInfo(TableName tableName,
byte[] startKey,
byte[] endKey,
boolean split,
long regionid,
int replicaId)
Deprecated.
Construct HRegionInfo with explicit parameters
|
Modifier and Type | Method and Description |
---|---|
static boolean |
areAdjacent(HRegionInfo regionA,
HRegionInfo regionB)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.areAdjacent(RegionInfo, RegionInfo) . |
boolean |
containsRange(byte[] rangeStartKey,
byte[] rangeEndKey)
Deprecated.
Returns true if the given inclusive range of rows is fully contained
by this region.
|
boolean |
containsRow(byte[] row)
Deprecated.
|
static String |
encodeRegionName(byte[] regionName)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.encodeRegionName(byte[]) . |
boolean |
equals(Object o)
Deprecated.
|
org.apache.hadoop.hbase.KeyValue.KVComparator |
getComparator()
Deprecated.
Use Region#getCellComparator(). deprecated for hbase 2.0, remove for hbase 3.0
|
String |
getEncodedName()
Deprecated.
|
byte[] |
getEncodedNameAsBytes()
Deprecated.
|
byte[] |
getEndKey()
Deprecated.
|
long |
getRegionId()
Deprecated.
|
byte[] |
getRegionName()
Deprecated.
|
String |
getRegionNameAsString()
Deprecated.
|
int |
getReplicaId()
Deprecated.
Returns the region replica id
|
String |
getShortNameToLog()
Deprecated.
|
static String |
getShortNameToLog(HRegionInfo... hris)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.getShortNameToLog(RegionInfo...) . |
static String |
getShortNameToLog(List<HRegionInfo> hris)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.getShortNameToLog(List) )}. |
byte[] |
getStartKey()
Deprecated.
|
static byte[] |
getStartKey(byte[] regionName)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.getStartKey(byte[]) . |
TableName |
getTable()
Deprecated.
Get current table name of the region
|
static TableName |
getTable(byte[] regionName)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.getTable(byte[]) . |
int |
hashCode()
Deprecated.
|
static boolean |
isEncodedRegionName(byte[] regionName)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.isEncodedRegionName(byte[]) . |
boolean |
isMetaRegion()
Deprecated.
|
boolean |
isMetaTable()
Deprecated.
|
boolean |
isOffline()
Deprecated.
|
boolean |
isSplit()
Deprecated.
|
boolean |
isSplitParent()
Deprecated.
|
boolean |
isSystemTable()
Deprecated.
|
static List<HRegionInfo> |
parseDelimitedFrom(byte[] bytes,
int offset,
int length)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.parseDelimitedFrom(byte[], int, int) . |
static HRegionInfo |
parseFrom(byte[] bytes)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.parseFrom(byte[]) . |
static HRegionInfo |
parseFrom(byte[] bytes,
int offset,
int len)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.parseFrom(byte[], int, int) . |
static HRegionInfo |
parseFromOrNull(byte[] bytes)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.parseFromOrNull(byte[]) . |
static HRegionInfo |
parseFromOrNull(byte[] bytes,
int offset,
int len)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.parseFromOrNull(byte[], int, int) . |
void |
setOffline(boolean offLine)
Deprecated.
The parent of a region split is offline while split daughters hold
references to the parent.
|
void |
setSplit(boolean split)
Deprecated.
|
byte[] |
toByteArray()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.toByteArray(RegionInfo) . |
byte[] |
toDelimitedByteArray()
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.toDelimitedByteArray(RegionInfo) . |
String |
toString()
Deprecated.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
areAdjacent, compareTo, createMobRegionInfo, getShortNameToLog, getShortNameToLog, isAdjacent, isDegenerate, isFirst, isLast, isNext, isOverlap, parseRegionNameOrReturnNull, toByteArray, toDelimitedByteArray, toDelimitedByteArray
public static final String ENCODED_REGION_NAME_REGEX
public static final byte[] HIDDEN_END_KEY
public static final byte[] HIDDEN_START_KEY
public static final HRegionInfo FIRST_META_REGIONINFO
public HRegionInfo(long regionId, TableName tableName, int replicaId)
public HRegionInfo(TableName tableName)
public HRegionInfo(TableName tableName, byte[] startKey, byte[] endKey) throws IllegalArgumentException
tableName
- the table namestartKey
- first key in regionendKey
- end of key rangeIllegalArgumentException
public HRegionInfo(TableName tableName, byte[] startKey, byte[] endKey, boolean split) throws IllegalArgumentException
tableName
- the table descriptorstartKey
- first key in regionendKey
- end of key rangesplit
- true if this region has split and we have daughter regions
regions that may or may not hold references to this region.IllegalArgumentException
public HRegionInfo(TableName tableName, byte[] startKey, byte[] endKey, boolean split, long regionid) throws IllegalArgumentException
tableName
- the table descriptorstartKey
- first key in regionendKey
- end of key rangesplit
- true if this region has split and we have daughter regions
regions that may or may not hold references to this region.regionid
- Region id to use.IllegalArgumentException
public HRegionInfo(TableName tableName, byte[] startKey, byte[] endKey, boolean split, long regionid, int replicaId) throws IllegalArgumentException
tableName
- the table descriptorstartKey
- first key in regionendKey
- end of key rangesplit
- true if this region has split and we have daughter regions
regions that may or may not hold references to this region.regionid
- Region id to use.replicaId
- the replicaId to useIllegalArgumentException
public HRegionInfo(RegionInfo other)
other
- public HRegionInfo(HRegionInfo other, int replicaId)
@Deprecated public static String encodeRegionName(byte[] regionName)
RegionInfo.encodeRegionName(byte[])
.encodeRegionName
in interface RegionInfo
regionName
- public String getShortNameToLog()
getShortNameToLog
in interface RegionInfo
@Deprecated public static String getShortNameToLog(HRegionInfo... hris)
RegionInfo.getShortNameToLog(RegionInfo...)
.@Deprecated public static String getShortNameToLog(List<HRegionInfo> hris)
RegionInfo.getShortNameToLog(List)
)}.hris
(usually encoded name) for us logging.@Deprecated public static TableName getTable(byte[] regionName)
RegionInfo.getTable(byte[])
.getTable
in interface RegionInfo
regionName
- to extract the table name from@Deprecated public static byte[] getStartKey(byte[] regionName) throws IOException
RegionInfo.getStartKey(byte[])
.getStartKey
in interface RegionInfo
regionName
- IOException
@Deprecated public static boolean isEncodedRegionName(byte[] regionName) throws IOException
RegionInfo.isEncodedRegionName(byte[])
.RegionInfo
isEncodedRegionName
in interface RegionInfo
regionName
- IOException
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 isMetaTable()
public boolean isMetaRegion()
isMetaRegion
in interface RegionInfo
public boolean isSystemTable()
public boolean isSplit()
isSplit
in interface RegionInfo
public void setSplit(boolean split)
split
- set split statuspublic boolean isOffline()
isOffline
in interface RegionInfo
public void 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
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
@Deprecated public org.apache.hadoop.hbase.KeyValue.KVComparator getComparator()
KeyValue
s.@Deprecated public byte[] toByteArray()
RegionInfo.toByteArray(RegionInfo)
.parseFrom(byte[])
@Deprecated public static HRegionInfo parseFromOrNull(byte[] bytes)
RegionInfo.parseFromOrNull(byte[])
.parseFromOrNull
in interface RegionInfo
HRegionInfo
or null if we failed deserialize or passed bytes nulltoByteArray()
@Deprecated public static HRegionInfo parseFromOrNull(byte[] bytes, int offset, int len)
RegionInfo.parseFromOrNull(byte[], int, int)
.parseFromOrNull
in interface RegionInfo
HRegionInfo
or null
if we failed deserialize or passed bytes nulltoByteArray()
public static HRegionInfo parseFrom(byte[] bytes) throws org.apache.hadoop.hbase.exceptions.DeserializationException
RegionInfo.parseFrom(byte[])
.parseFrom
in interface RegionInfo
bytes
- A pb RegionInfo serialized with a pb magic prefix.HRegionInfo
org.apache.hadoop.hbase.exceptions.DeserializationException
toByteArray()
@Deprecated public static HRegionInfo parseFrom(byte[] bytes, int offset, int len) throws org.apache.hadoop.hbase.exceptions.DeserializationException
RegionInfo.parseFrom(byte[], int, int)
.parseFrom
in interface RegionInfo
bytes
- A pb RegionInfo serialized with a pb magic prefix.offset
- starting point in the byte arraylen
- length to read on the byte arrayHRegionInfo
org.apache.hadoop.hbase.exceptions.DeserializationException
toByteArray()
@Deprecated public byte[] toDelimitedByteArray() throws IOException
RegionInfo.toDelimitedByteArray(RegionInfo)
.toByteArray()
when writing to a stream and you want to use
the pb mergeDelimitedFrom (w/o the delimiter, pb reads to EOF which may not be what you want).IOException
toByteArray()
@Deprecated public static List<HRegionInfo> parseDelimitedFrom(byte[] bytes, int offset, int length) throws IOException
RegionInfo.parseDelimitedFrom(byte[], int, int)
.toDelimitedByteArray()
parseDelimitedFrom
in interface RegionInfo
bytes
- serialized bytesoffset
- the start offset into the byte[] bufferlength
- how far we should read into the byte[] bufferIOException
@Deprecated public static boolean areAdjacent(HRegionInfo regionA, HRegionInfo regionB)
RegionInfo.areAdjacent(RegionInfo, RegionInfo)
.regionA
- regionB
- Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.