RegionInfoBuilder
to build RegionInfo
.@Deprecated @InterfaceAudience.Public public class HRegionInfo extends Object implements RegionInfo, Comparable<HRegionInfo>
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.
|
COMPARATOR, DEFAULT_REPLICA_ID, ENC_SEPARATOR, INVALID_REGION_NAME_FORMAT_MESSAGE, MD5_HEX_LENGTH, REPLICA_ID_DELIMITER, REPLICA_ID_FORMAT
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) . |
int |
compareTo(HRegionInfo o)
Deprecated.
|
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 HRegionInfo |
convert(HBaseProtos.RegionInfo proto)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use toRegionInfo(HBaseProtos.RegionInfo)
in org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil.
|
static HBaseProtos.RegionInfo |
convert(HRegionInfo info)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use toRegionInfo(org.apache.hadoop.hbase.client.RegionInfo)
in org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil.
|
static byte[] |
createRegionName(TableName tableName,
byte[] startKey,
byte[] id,
boolean newFormat)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.createRegionName(TableName, byte[], byte[], boolean) . |
static byte[] |
createRegionName(TableName tableName,
byte[] startKey,
byte[] id,
int replicaId,
boolean newFormat)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.createRegionName(TableName, byte[], byte[], int, boolean) . |
static byte[] |
createRegionName(TableName tableName,
byte[] startKey,
long regionid,
boolean newFormat)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.createRegionName(TableName, byte[], long, boolean) . |
static byte[] |
createRegionName(TableName tableName,
byte[] startKey,
long regionid,
int replicaId,
boolean newFormat)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.createRegionName(TableName, byte[], long, int, boolean) . |
static byte[] |
createRegionName(TableName tableName,
byte[] startKey,
String id,
boolean newFormat)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.createRegionName(TableName, byte[], String, boolean) . |
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.
|
KeyValue.KVComparator |
getComparator()
Deprecated.
Use Region#getCellComparator(). deprecated for hbase 2.0, remove for hbase 3.0
|
static String |
getDescriptiveNameFromRegionStateForDisplay(RegionState state,
org.apache.hadoop.conf.Configuration conf)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use RegionInfoDisplay#getDescriptiveNameFromRegionStateForDisplay(RegionState, Configuration)
over in hbase-server module.
|
String |
getEncodedName()
Deprecated.
|
byte[] |
getEncodedNameAsBytes()
Deprecated.
|
byte[] |
getEndKey()
Deprecated.
|
static byte[] |
getEndKeyForDisplay(HRegionInfo hri,
org.apache.hadoop.conf.Configuration conf)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use RegionInfoDisplay#getEndKeyForDisplay(RegionInfo, Configuration)
over in hbase-server module.
|
long |
getRegionId()
Deprecated.
|
byte[] |
getRegionName()
Deprecated.
|
String |
getRegionNameAsString()
Deprecated.
|
static String |
getRegionNameAsStringForDisplay(HRegionInfo hri,
org.apache.hadoop.conf.Configuration conf)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use RegionInfoDisplay#getRegionNameAsStringForDisplay(RegionInfo, Configuration)
over in hbase-server module.
|
static byte[] |
getRegionNameForDisplay(HRegionInfo hri,
org.apache.hadoop.conf.Configuration conf)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use RegionInfoDisplay#getRegionNameForDisplay(RegionInfo, Configuration)
over in hbase-server module.
|
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[]) . |
static byte[] |
getStartKeyForDisplay(HRegionInfo hri,
org.apache.hadoop.conf.Configuration conf)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use RegionInfoDisplay#getStartKeyForDisplay(RegionInfo, Configuration)
over in hbase-server module.
|
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 |
parseFrom(DataInputStream in)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.parseFrom(DataInputStream) . |
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) . |
static byte[][] |
parseRegionName(byte[] regionName)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.parseRegionName(byte[]) . |
static String |
prettyPrint(String encodedRegionName)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
RegionInfo.prettyPrint(String) . |
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) . |
static byte[] |
toDelimitedByteArray(HRegionInfo... infos)
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, createMobRegionInfo, getRegionNameAsString, getRegionNameAsString, getShortNameToLog, getShortNameToLog, hasEncodedName, toByteArray, toDelimitedByteArray, toDelimitedByteArray
public static final String ENCODED_REGION_NAME_REGEX
public static final String NO_HASH
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 @InterfaceAudience.Private public static String prettyPrint(String encodedRegionName)
RegionInfo.prettyPrint(String)
.prettyPrint
in interface RegionInfo
encodedRegionName
- The encoded regionname.hbase:meta
if passed 1028785192
else returns
encodedRegionName
@Deprecated @InterfaceAudience.Private public static byte[] createRegionName(TableName tableName, byte[] startKey, long regionid, boolean newFormat)
RegionInfo.createRegionName(TableName, byte[], long, boolean)
.createRegionName
in interface RegionInfo
tableName
- startKey
- Can be nullregionid
- Region id (Usually timestamp from when region was created).newFormat
- should we create the region name in the new format
(such that it contains its encoded name?).@Deprecated @InterfaceAudience.Private public static byte[] createRegionName(TableName tableName, byte[] startKey, String id, boolean newFormat)
RegionInfo.createRegionName(TableName, byte[], String, boolean)
.createRegionName
in interface RegionInfo
tableName
- startKey
- Can be nullid
- Region id (Usually timestamp from when region was created).newFormat
- should we create the region name in the new format
(such that it contains its encoded name?).@Deprecated @InterfaceAudience.Private public static byte[] createRegionName(TableName tableName, byte[] startKey, long regionid, int replicaId, boolean newFormat)
RegionInfo.createRegionName(TableName, byte[], long, int, boolean)
.createRegionName
in interface RegionInfo
tableName
- startKey
- Can be nullregionid
- Region id (Usually timestamp from when region was created).replicaId
- newFormat
- should we create the region name in the new format
(such that it contains its encoded name?).@Deprecated @InterfaceAudience.Private public static byte[] createRegionName(TableName tableName, byte[] startKey, byte[] id, boolean newFormat)
RegionInfo.createRegionName(TableName, byte[], byte[], boolean)
.createRegionName
in interface RegionInfo
tableName
- startKey
- Can be nullid
- Region id (Usually timestamp from when region was created).newFormat
- should we create the region name in the new format
(such that it contains its encoded name?).@Deprecated @InterfaceAudience.Private public static byte[] createRegionName(TableName tableName, byte[] startKey, byte[] id, int replicaId, boolean newFormat)
RegionInfo.createRegionName(TableName, byte[], byte[], int, boolean)
.createRegionName
in interface RegionInfo
tableName
- startKey
- Can be nullid
- Region id (Usually timestamp from when region was created).replicaId
- newFormat
- should we create the region name in the new format@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 @InterfaceAudience.Private public static byte[][] parseRegionName(byte[] regionName) throws IOException
RegionInfo.parseRegionName(byte[])
.parseRegionName
in interface RegionInfo
regionName
- IOException
@Deprecated public static boolean isEncodedRegionName(byte[] regionName) throws IOException
RegionInfo.isEncodedRegionName(byte[])
.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()
public int compareTo(HRegionInfo o)
compareTo
in interface Comparable<HRegionInfo>
@Deprecated public KeyValue.KVComparator getComparator()
KeyValue
s.@Deprecated @InterfaceAudience.Private public static HBaseProtos.RegionInfo convert(HRegionInfo info)
info
- the HRegionInfo to convert@Deprecated @InterfaceAudience.Private public static HRegionInfo convert(HBaseProtos.RegionInfo proto)
proto
- the RegionInfo to convert@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 DeserializationException
RegionInfo.parseFrom(byte[])
.parseFrom
in interface RegionInfo
bytes
- A pb RegionInfo serialized with a pb magic prefix.HRegionInfo
DeserializationException
toByteArray()
@Deprecated public static HRegionInfo parseFrom(byte[] bytes, int offset, int len) throws 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
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 @InterfaceAudience.Private public static String getDescriptiveNameFromRegionStateForDisplay(RegionState state, org.apache.hadoop.conf.Configuration conf)
RegionState
does it but with hidden
startkey optionallystate
- conf
- @Deprecated @InterfaceAudience.Private public static byte[] getEndKeyForDisplay(HRegionInfo hri, org.apache.hadoop.conf.Configuration conf)
hri
- conf
- @Deprecated @InterfaceAudience.Private public static byte[] getStartKeyForDisplay(HRegionInfo hri, org.apache.hadoop.conf.Configuration conf)
hri
- conf
- @Deprecated @InterfaceAudience.Private public static String getRegionNameAsStringForDisplay(HRegionInfo hri, org.apache.hadoop.conf.Configuration conf)
hri
- conf
- @Deprecated @InterfaceAudience.Private public static byte[] getRegionNameForDisplay(HRegionInfo hri, org.apache.hadoop.conf.Configuration conf)
hri
- conf
- @Deprecated @InterfaceAudience.Private public static HRegionInfo parseFrom(DataInputStream in) throws IOException
RegionInfo.parseFrom(DataInputStream)
.toDelimitedByteArray()
parseFrom
in interface RegionInfo
in
- IOException
@Deprecated @InterfaceAudience.Private public static byte[] toDelimitedByteArray(HRegionInfo... infos) 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). parseDelimitedFrom(byte[], int, int)
can
be used to read back the instances.infos
- HRegionInfo objects to serializeIOException
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–2019 Cloudera. All rights reserved.