Package org.apache.hadoop.hbase
Class HRegionInfo
java.lang.Object
org.apache.hadoop.hbase.HRegionInfo
- All Implemented Interfaces:
Comparable<RegionInfo>
,RegionInfo
- Direct Known Subclasses:
HbckRegionInfo.MetaEntry
,ImmutableHRegionInfo
,UnmodifyableHRegionInfo
Deprecated.
Information about a region. A region is a range of keys in the whole keyspace of a table, an
identifier (a timestamp) for differentiating between subset ranges (after region split) and a
replicaId for differentiating the instance for the same range and some status information about
the region. The region has a unique name which consists of the following fields:
Other than the fields in the region name, region info contains:
- tableName : The name of the table
- startKey : The startKey for the region.
- regionId : A timestamp when the region is created.
- replicaId : An id starting from 0 to differentiate replicas of the same region range but hosted in separated servers. The same region range can be hosted in multiple locations.
- encodedName : An MD5 encoded string for the region name.
Other than the fields in the region name, region info contains:
- endKey : the endKey for the region (exclusive)
- split : Whether the region is split
- offline : Whether the region is offline
-
Field Summary
Modifier and TypeFieldDescription(package private) static final String
Deprecated.static final String
Deprecated.A non-capture group so that this can be embedded.private String
Deprecated.private byte[]
Deprecated.private byte[]
Deprecated.static final HRegionInfo
Deprecated.HRegionInfo for first meta regionprivate int
Deprecated.static final byte[]
Deprecated.static final byte[]
Deprecated.private static final org.slf4j.Logger
Deprecated.private static final int
Deprecated.static final String
Deprecated.private boolean
Deprecated.private long
Deprecated.private byte[]
Deprecated.private int
Deprecated.private boolean
Deprecated.private byte[]
Deprecated.private TableName
Deprecated.Fields inherited from interface org.apache.hadoop.hbase.client.RegionInfo
COMPARATOR, DEFAULT_REPLICA_ID, ENC_SEPARATOR, INVALID_REGION_NAME_FORMAT_MESSAGE, MD5_HEX_LENGTH, REPLICA_ID_DELIMITER, REPLICA_ID_FORMAT
-
Constructor Summary
ModifierConstructorDescriptionprivate
HRegionInfo
(long regionId, TableName tableName) Deprecated.Private constructor used constructing HRegionInfo for the first meta regionsHRegionInfo
(long regionId, TableName tableName, int replicaId) Deprecated.HRegionInfo
(RegionInfo other) Deprecated.Construct a copy of another HRegionInfoHRegionInfo
(HRegionInfo other, int replicaId) Deprecated.HRegionInfo
(TableName tableName) Deprecated.HRegionInfo
(TableName tableName, byte[] startKey, byte[] endKey) Deprecated.Construct HRegionInfo with explicit parametersHRegionInfo
(TableName tableName, byte[] startKey, byte[] endKey, boolean split) Deprecated.Construct HRegionInfo with explicit parametersHRegionInfo
(TableName tableName, byte[] startKey, byte[] endKey, boolean split, long regionId) Deprecated.Construct HRegionInfo with explicit parametersHRegionInfo
(TableName tableName, byte[] startKey, byte[] endKey, boolean split, long regionId, int replicaId) Deprecated.Construct HRegionInfo with explicit parameters -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
areAdjacent
(HRegionInfo regionA, HRegionInfo regionB) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.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.Returns true if the given row falls in this region.(package private) org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionInfo
convert()
Deprecated.Convert a HRegionInfo to the protobuf RegionInfostatic org.apache.hadoop.hbase.shaded.protobuf.generated.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 HRegionInfo
convert
(org.apache.hadoop.hbase.shaded.protobuf.generated.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 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 UseRegionInfo.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 UseRegionInfo.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 UseRegionInfo.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 UseRegionInfo.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 UseRegionInfo.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 UseRegionInfo.encodeRegionName(byte[])
.boolean
Deprecated.Deprecated.Use Region#getCellComparator().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.Deprecated.Returns the encoded region namebyte[]
Deprecated.Returns the encoded region name as an array of bytes.byte[]
Deprecated.Returns the endKeystatic 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
Deprecated.Returns the regionIdbyte[]
Deprecated.Returns the regionName as an array of bytes.Deprecated.Returns Region name as a String for use in logging, etc.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
Deprecated.Returns the region replica idDeprecated.Returns Return a short, printable name for this region (usually encoded name) for us logging.static String
getShortNameToLog
(List<HRegionInfo> hris) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.getShortNameToLog(List)
)}.static String
getShortNameToLog
(HRegionInfo... hris) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.getShortNameToLog(RegionInfo...)
.byte[]
Deprecated.Returns the startKeystatic byte[]
getStartKey
(byte[] regionName) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.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.getTable()
Deprecated.Get current table name of the regionstatic TableName
getTable
(byte[] regionName) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.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 UseRegionInfo.isEncodedRegionName(byte[])
.boolean
Deprecated.Returns true if this region is a meta regionboolean
Deprecated.Returns true if this region is from hbase:metaboolean
Deprecated.Returns true if this region is offline.boolean
isSplit()
Deprecated.Returns true if has been split and has daughters.boolean
Deprecated.Returns true if this is a split parent region.boolean
Deprecated.Returns true if this region is from a system tablestatic 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 UseRegionInfo.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 UseRegionInfo.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 UseRegionInfo.parseFrom(byte[], int, int)
.static HRegionInfo
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.parseFrom(DataInputStream)
.static HRegionInfo
parseFromOrNull
(byte[] bytes) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.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 UseRegionInfo.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 UseRegionInfo.parseRegionName(byte[])
.static String
prettyPrint
(String encodedRegionName) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.prettyPrint(String)
.private void
Deprecated.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.Set or clear the split status flag.byte[]
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.toByteArray(RegionInfo)
.byte[]
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.toDelimitedByteArray(RegionInfo)
.static byte[]
toDelimitedByteArray
(HRegionInfo... infos) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.toDelimitedByteArray(RegionInfo...)
.toString()
Deprecated.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.client.RegionInfo
compareTo, isAdjacent, isDegenerate, isFirst, isLast, isNext, isOverlap
-
Field Details
-
LOG
Deprecated. -
ENCODED_REGION_NAME_REGEX
Deprecated.A non-capture group so that this can be embedded.- See Also:
-
MAX_REPLICA_ID
Deprecated.- See Also:
-
endKey
Deprecated. -
offLine
Deprecated. -
regionId
Deprecated. -
regionName
Deprecated. -
split
Deprecated. -
startKey
Deprecated. -
hashCode
Deprecated. -
NO_HASH
Deprecated. -
encodedName
Deprecated. -
encodedNameAsBytes
Deprecated. -
replicaId
Deprecated. -
tableName
Deprecated. -
DISPLAY_KEYS_KEY
Deprecated.- See Also:
-
HIDDEN_END_KEY
Deprecated. -
HIDDEN_START_KEY
Deprecated. -
FIRST_META_REGIONINFO
Deprecated.HRegionInfo for first meta region
-
-
Constructor Details
-
HRegionInfo
Deprecated.Private constructor used constructing HRegionInfo for the first meta regions -
HRegionInfo
Deprecated. -
HRegionInfo
Deprecated. -
HRegionInfo
public HRegionInfo(TableName tableName, byte[] startKey, byte[] endKey) throws IllegalArgumentException Deprecated.Construct HRegionInfo with explicit parameters- Parameters:
tableName
- the table namestartKey
- first key in regionendKey
- end of key range- Throws:
IllegalArgumentException
-
HRegionInfo
public HRegionInfo(TableName tableName, byte[] startKey, byte[] endKey, boolean split) throws IllegalArgumentException Deprecated.Construct HRegionInfo with explicit parameters- Parameters:
tableName
- the table namestartKey
- 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.- Throws:
IllegalArgumentException
-
HRegionInfo
public HRegionInfo(TableName tableName, byte[] startKey, byte[] endKey, boolean split, long regionId) throws IllegalArgumentException Deprecated.Construct HRegionInfo with explicit parameters- Parameters:
tableName
- the table namestartKey
- 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.- Throws:
IllegalArgumentException
-
HRegionInfo
public HRegionInfo(TableName tableName, byte[] startKey, byte[] endKey, boolean split, long regionId, int replicaId) throws IllegalArgumentException Deprecated.Construct HRegionInfo with explicit parameters- Parameters:
tableName
- the table namestartKey
- 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 use- Throws:
IllegalArgumentException
-
HRegionInfo
Deprecated.Construct a copy of another HRegionInfo -
HRegionInfo
Deprecated.
-
-
Method Details
-
encodeRegionName
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.encodeRegionName(byte[])
.Description copied from interface:RegionInfo
Returns the encodedName- Returns:
- the encodedName
-
getShortNameToLog
Deprecated.Returns Return a short, printable name for this region (usually encoded name) for us logging.- Specified by:
getShortNameToLog
in interfaceRegionInfo
-
getShortNameToLog
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.getShortNameToLog(RegionInfo...)
. -
getShortNameToLog
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.getShortNameToLog(List)
)}.Description copied from interface:RegionInfo
Returns a String of short, printable names forhris
(usually encoded name) for us logging.- Returns:
- Return a String of short, printable names for
hris
(usually encoded name) for us logging.
-
prettyPrint
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.prettyPrint(String)
.Use logging.- Parameters:
encodedRegionName
- The encoded regionname.- Returns:
hbase:meta
if passed1028785192
else returnsencodedRegionName
-
setHashCode
Deprecated. -
createRegionName
@Deprecated @Private public 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 UseRegionInfo.createRegionName(TableName, byte[], long, boolean)
.Make a region name of passed parameters.- Parameters:
tableName
- the table namestartKey
- 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?).- Returns:
- Region name made of passed tableName, startKey and id
-
createRegionName
@Deprecated @Private public 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 UseRegionInfo.createRegionName(TableName, byte[], String, boolean)
.Make a region name of passed parameters.- Parameters:
tableName
- the table namestartKey
- 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?).- Returns:
- Region name made of passed tableName, startKey and id
-
createRegionName
@Deprecated @Private public 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 UseRegionInfo.createRegionName(TableName, byte[], long, int, boolean)
.Make a region name of passed parameters.- Parameters:
tableName
- the table namestartKey
- 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?).- Returns:
- Region name made of passed tableName, startKey, id and replicaId
-
createRegionName
@Deprecated @Private public 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 UseRegionInfo.createRegionName(TableName, byte[], byte[], boolean)
.Make a region name of passed parameters.- Parameters:
tableName
- the table namestartKey
- 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?).- Returns:
- Region name made of passed tableName, startKey and id
-
createRegionName
@Deprecated @Private public 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 UseRegionInfo.createRegionName(TableName, byte[], byte[], int, boolean)
.Make a region name of passed parameters.- Parameters:
tableName
- the table namestartKey
- Can be nullid
- Region id (Usually timestamp from when region was created)newFormat
- should we create the region name in the new format- Returns:
- Region name made of passed tableName, startKey, id and replicaId
-
getTable
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.getTable(byte[])
.Gets the table name from the specified region name.- Parameters:
regionName
- to extract the table name from- Returns:
- Table name
-
getStartKey
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.getStartKey(byte[])
.Gets the start key from the specified region name.- Returns:
- Start key.
- Throws:
IOException
-
parseRegionName
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.parseRegionName(byte[])
.Separate elements of a regionName.- Returns:
- Array of byte[] containing tableName, startKey and id
- Throws:
IOException
- if not parseable as regionName.
-
isEncodedRegionName
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.isEncodedRegionName(byte[])
.Description copied from interface:RegionInfo
Figure if the passed bytes represent an encoded region name or not.- Parameters:
regionName
- A Region name either encoded or not.- Returns:
- if region name is encoded.
- Throws:
IOException
-
getRegionId
Deprecated.Returns the regionId- Specified by:
getRegionId
in interfaceRegionInfo
-
getRegionName
Deprecated.Description copied from interface:RegionInfo
Returns the regionName as an array of bytes.- Specified by:
getRegionName
in interfaceRegionInfo
- Returns:
- the regionName as an array of bytes.
- See Also:
-
getRegionNameAsString
Deprecated.Returns Region name as a String for use in logging, etc.- Specified by:
getRegionNameAsString
in interfaceRegionInfo
-
getEncodedName
Deprecated.Returns the encoded region name- Specified by:
getEncodedName
in interfaceRegionInfo
-
getEncodedNameAsBytes
Deprecated.Description copied from interface:RegionInfo
Returns the encoded region name as an array of bytes.- Specified by:
getEncodedNameAsBytes
in interfaceRegionInfo
-
getStartKey
Deprecated.Returns the startKey- Specified by:
getStartKey
in interfaceRegionInfo
-
getEndKey
Deprecated.Returns the endKey- Specified by:
getEndKey
in interfaceRegionInfo
-
getTable
Deprecated.Get current table name of the region- Specified by:
getTable
in interfaceRegionInfo
-
containsRange
Deprecated.Returns true if the given inclusive range of rows is fully contained by this region. For example, if the region is foo,a,g and this is passed ["b","c"] or ["a","c"] it will return true, but if this is passed ["b","z"] it will return false.- Specified by:
containsRange
in interfaceRegionInfo
- Throws:
IllegalArgumentException
- if the range passed is invalid (ie. end < start)
-
containsRow
Deprecated.Returns true if the given row falls in this region.- Specified by:
containsRow
in interfaceRegionInfo
-
isMetaTable
Deprecated.Returns true if this region is from hbase:meta -
isMetaRegion
Deprecated.Returns true if this region is a meta region- Specified by:
isMetaRegion
in interfaceRegionInfo
-
isSystemTable
Deprecated.Returns true if this region is from a system table -
isSplit
Deprecated.Returns true if has been split and has daughters.- Specified by:
isSplit
in interfaceRegionInfo
-
setSplit
Deprecated.Set or clear the split status flag.- Parameters:
split
- set split status
-
isOffline
Deprecated.Returns true if this region is offline.- Specified by:
isOffline
in interfaceRegionInfo
- See Also:
-
setOffline
Deprecated.The parent of a region split is offline while split daughters hold references to the parent. Offlined regions are closed.- Parameters:
offLine
- Set online/offline status.
-
isSplitParent
Deprecated.Returns true if this is a split parent region.- Specified by:
isSplitParent
in interfaceRegionInfo
- See Also:
-
getReplicaId
Deprecated.Returns the region replica id- Specified by:
getReplicaId
in interfaceRegionInfo
- Returns:
- returns region replica id
-
toString
Deprecated. -
equals
Deprecated. -
hashCode
Deprecated. -
getComparator
Deprecated.Use Region#getCellComparator(). deprecated for hbase 2.0, remove for hbase 3.0- Returns:
- Comparator to use comparing
KeyValue
s.
-
convert
org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionInfo convert()Deprecated.Convert a HRegionInfo to the protobuf RegionInfo- Returns:
- the converted RegionInfo
-
convert
@Deprecated @Private public static org.apache.hadoop.hbase.shaded.protobuf.generated.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.Convert a HRegionInfo to a RegionInfo- Parameters:
info
- the HRegionInfo to convert- Returns:
- the converted RegionInfo
-
convert
@Deprecated @Private public static HRegionInfo convert(org.apache.hadoop.hbase.shaded.protobuf.generated.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.Convert a RegionInfo to a HRegionInfo- Parameters:
proto
- the RegionInfo to convert- Returns:
- the converted HRegionInfo
-
toByteArray
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.toByteArray(RegionInfo)
.Serialize aHRegionInfo
into a byte array.- Returns:
- This instance serialized as protobuf w/ a magic pb prefix.
- See Also:
-
parseFromOrNull
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.parseFromOrNull(byte[])
.Parse a serialized representation of aHRegionInfo
.- Returns:
- A deserialized
HRegionInfo
or null if we failed deserialize or passed bytes null - See Also:
-
parseFromOrNull
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.parseFromOrNull(byte[], int, int)
.Parse a serialized representation of aHRegionInfo
.- Returns:
- A deserialized
HRegionInfo
or null if we failed deserialize or passed bytes null - See Also:
-
parseFrom
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.parseFrom(byte[])
.Parse a serialized representation of aHRegionInfo
.- Parameters:
bytes
- A pb RegionInfo serialized with a pb magic prefix.- Returns:
- A deserialized
HRegionInfo
- Throws:
DeserializationException
- See Also:
-
parseFrom
@Deprecated public static HRegionInfo parseFrom(byte[] bytes, int offset, int len) throws DeserializationException Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.parseFrom(byte[], int, int)
.Parse a serialized representation of aHRegionInfo
.- Parameters:
bytes
- A pb RegionInfo serialized with a pb magic prefix.offset
- starting point in the byte arraylen
- length to read on the byte array- Returns:
- A deserialized
HRegionInfo
- Throws:
DeserializationException
- See Also:
-
toDelimitedByteArray
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.toDelimitedByteArray(RegionInfo)
.Use this instead oftoByteArray()
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).- Returns:
- This instance serialized as a delimited protobuf w/ a magic pb prefix.
- Throws:
IOException
- See Also:
-
getDescriptiveNameFromRegionStateForDisplay
@Deprecated @Private public 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.Get the descriptive name asRegionState
does it but with hidden startkey optionally- Returns:
- descriptive string
-
getEndKeyForDisplay
@Deprecated @Private public 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.Get the end key for display. Optionally hide the real end key.- Returns:
- the endkey
-
getStartKeyForDisplay
@Deprecated @Private public 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.Get the start key for display. Optionally hide the real start key.- Returns:
- the startkey
-
getRegionNameAsStringForDisplay
@Deprecated @Private public 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.Get the region name for display. Optionally hide the start key.- Returns:
- region name as String
-
getRegionNameForDisplay
@Deprecated @Private public 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.Get the region name for display. Optionally hide the start key.- Returns:
- region name bytes
-
parseFrom
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.parseFrom(DataInputStream)
.Parses an HRegionInfo instance from the passed in stream. Presumes the HRegionInfo was serialized to the stream withtoDelimitedByteArray()
- Returns:
- An instance of HRegionInfo.
- Throws:
IOException
-
toDelimitedByteArray
@Deprecated @Private public static byte[] toDelimitedByteArray(HRegionInfo... infos) throws IOException Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.toDelimitedByteArray(RegionInfo...)
.Serializes given HRegionInfo's as a byte array. Use this instead oftoByteArray()
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.- Parameters:
infos
- HRegionInfo objects to serialize- Returns:
- This instance serialized as a delimited protobuf w/ a magic pb prefix.
- Throws:
IOException
- See Also:
-
parseDelimitedFrom
@Deprecated public static List<HRegionInfo> parseDelimitedFrom(byte[] bytes, int offset, int length) throws IOException Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.parseDelimitedFrom(byte[], int, int)
.Parses all the HRegionInfo instances from the passed in stream until EOF. Presumes the HRegionInfo's were serialized to the stream withtoDelimitedByteArray()
- Parameters:
bytes
- serialized bytesoffset
- the start offset into the byte[] bufferlength
- how far we should read into the byte[] buffer- Returns:
- All the hregioninfos that are in the byte array. Keeps reading till we hit the end.
- Throws:
IOException
-
areAdjacent
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.areAdjacent(RegionInfo, RegionInfo)
.Check whether two regions are adjacent- Returns:
- true if two regions are adjacent
-
RegionInfoBuilder
to buildRegionInfo
.