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
FieldsModifier and TypeFieldDescription(package private) static final StringDeprecated.static final StringDeprecated.A non-capture group so that this can be embedded.private StringDeprecated.private byte[]Deprecated.private byte[]Deprecated.static final HRegionInfoDeprecated.HRegionInfo for first meta regionprivate intDeprecated.static final byte[]Deprecated.static final byte[]Deprecated.private static final org.slf4j.LoggerDeprecated.private static final intDeprecated.static final StringDeprecated.private booleanDeprecated.private longDeprecated.private byte[]Deprecated.private intDeprecated.private booleanDeprecated.private byte[]Deprecated.private TableNameDeprecated.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
ConstructorsModifierConstructorDescriptionprivateHRegionInfo(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 booleanareAdjacent(HRegionInfo regionA, HRegionInfo regionB) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.areAdjacent(RegionInfo, RegionInfo).booleancontainsRange(byte[] rangeStartKey, byte[] rangeEndKey) Deprecated.Returns true if the given inclusive range of rows is fully contained by this region.booleancontainsRow(byte[] row) Deprecated.Returns true if the given row falls in this region.(package private) org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionInfoconvert()Deprecated.Convert a HRegionInfo to the protobuf RegionInfostatic org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionInfoconvert(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 HRegionInfoconvert(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 StringencodeRegionName(byte[] regionName) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.encodeRegionName(byte[]).booleanDeprecated.Deprecated.Use Region#getCellComparator().static StringgetDescriptiveNameFromRegionStateForDisplay(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.longDeprecated.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 StringgetRegionNameAsStringForDisplay(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.intDeprecated.Returns the region replica idDeprecated.Returns Return a short, printable name for this region (usually encoded name) for us logging.static StringgetShortNameToLog(List<HRegionInfo> hris) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.getShortNameToLog(List))}.static StringgetShortNameToLog(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 TableNamegetTable(byte[] regionName) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.getTable(byte[]).inthashCode()Deprecated.static booleanisEncodedRegionName(byte[] regionName) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.isEncodedRegionName(byte[]).booleanDeprecated.Returns true if this region is a meta regionbooleanDeprecated.Returns true if this region is from hbase:metabooleanDeprecated.Returns true if this region is offline.booleanisSplit()Deprecated.Returns true if has been split and has daughters.booleanDeprecated.Returns true if this is a split parent region.booleanDeprecated.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 HRegionInfoparseFrom(byte[] bytes) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.parseFrom(byte[]).static HRegionInfoparseFrom(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 HRegionInfoDeprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.parseFrom(DataInputStream).static HRegionInfoparseFromOrNull(byte[] bytes) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.parseFromOrNull(byte[]).static HRegionInfoparseFromOrNull(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 StringprettyPrint(String encodedRegionName) Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0 UseRegionInfo.prettyPrint(String).private voidDeprecated.voidsetOffline(boolean offLine) Deprecated.The parent of a region split is offline while split daughters hold references to the parent.voidsetSplit(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, waitMethods 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:RegionInfoReturns the encodedName- Returns:
- the encodedName
-
getShortNameToLog
Deprecated.Returns Return a short, printable name for this region (usually encoded name) for us logging.- Specified by:
getShortNameToLogin 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:RegionInfoReturns 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:metaif passed1028785192else 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:RegionInfoFigure 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:
getRegionIdin interfaceRegionInfo
-
getRegionName
Deprecated.Description copied from interface:RegionInfoReturns the regionName as an array of bytes.- Specified by:
getRegionNamein 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:
getRegionNameAsStringin interfaceRegionInfo
-
getEncodedName
Deprecated.Returns the encoded region name- Specified by:
getEncodedNamein interfaceRegionInfo
-
getEncodedNameAsBytes
Deprecated.Description copied from interface:RegionInfoReturns the encoded region name as an array of bytes.- Specified by:
getEncodedNameAsBytesin interfaceRegionInfo
-
getStartKey
Deprecated.Returns the startKey- Specified by:
getStartKeyin interfaceRegionInfo
-
getEndKey
Deprecated.Returns the endKey- Specified by:
getEndKeyin interfaceRegionInfo
-
getTable
Deprecated.Get current table name of the region- Specified by:
getTablein 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:
containsRangein 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:
containsRowin 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:
isMetaRegionin 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:
isSplitin 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:
isOfflinein 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:
isSplitParentin interfaceRegionInfo- See Also:
-
getReplicaId
Deprecated.Returns the region replica id- Specified by:
getReplicaIdin 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
KeyValues.
-
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 aHRegionInfointo 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
HRegionInfoor 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
HRegionInfoor 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 asRegionStatedoes 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
-
RegionInfoBuilderto buildRegionInfo.