|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.HRegionInfo
public class HRegionInfo
HRegion information. Contains HRegion id, start and end keys, a reference to this HRegions' table descriptor, etc.
Field Summary | |
---|---|
static char |
DELIMITER
delimiter used between portions of a region name |
Constructor Summary | |
---|---|
HRegionInfo()
Default constructor - creates empty object |
|
HRegionInfo(long regionId,
HTableDescriptor tableDesc,
Text startKey,
Text endKey)
Construct HRegionInfo with explicit parameters |
|
HRegionInfo(long regionId,
HTableDescriptor tableDesc,
Text startKey,
Text endKey,
boolean split)
Construct HRegionInfo with explicit parameters |
Method Summary | |
---|---|
int |
compareTo(Object o)
|
boolean |
equals(Object o)
|
Text |
getEndKey()
|
long |
getRegionId()
|
Text |
getRegionName()
|
Text |
getStartKey()
|
HTableDescriptor |
getTableDesc()
|
static Text |
getTableNameFromRegionName(Text regionName)
Extracts table name prefix from a region name. |
int |
hashCode()
|
boolean |
isOffline()
|
boolean |
isSplit()
|
void |
readFields(DataInput in)
Deserialize the fields of this object from in . |
String |
toString()
|
void |
write(DataOutput out)
Serialize the fields of this object to out . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final char DELIMITER
Constructor Detail |
---|
public HRegionInfo()
public HRegionInfo(long regionId, HTableDescriptor tableDesc, Text startKey, Text endKey) throws IllegalArgumentException
regionId
- the region idtableDesc
- the table descriptorstartKey
- first key in regionendKey
- end of key range
IllegalArgumentException
public HRegionInfo(long regionId, HTableDescriptor tableDesc, Text startKey, Text endKey, boolean split) throws IllegalArgumentException
regionId
- the region idtableDesc
- 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
Method Detail |
---|
public static Text getTableNameFromRegionName(Text regionName)
regionName
- A region name.
public Text getEndKey()
public long getRegionId()
public Text getRegionName()
public Text getStartKey()
public HTableDescriptor getTableDesc()
public boolean isSplit()
public boolean isOffline()
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void write(DataOutput out) throws IOException
out
.
write
in interface Writable
out
- DataOuput
to serialize this object into.
IOException
public void readFields(DataInput in) throws IOException
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
in interface Writable
in
- DataInput
to deseriablize this object from.
IOException
public int compareTo(Object o)
compareTo
in interface Comparable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |