|
||||||||||
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 HRegionInfo |
firstMetaRegionInfo
HRegionInfo for first meta region |
static HRegionInfo |
rootRegionInfo
HRegionInfo for root region |
Constructor Summary | |
---|---|
HRegionInfo()
Default constructor - creates empty object |
|
HRegionInfo(HTableDescriptor tableDesc,
org.apache.hadoop.io.Text startKey,
org.apache.hadoop.io.Text endKey)
Construct HRegionInfo with explicit parameters |
|
HRegionInfo(HTableDescriptor tableDesc,
org.apache.hadoop.io.Text startKey,
org.apache.hadoop.io.Text endKey,
boolean split)
Construct HRegionInfo with explicit parameters |
Method Summary | |
---|---|
int |
compareTo(Object o)
|
static String |
encodeRegionName(org.apache.hadoop.io.Text regionName)
|
boolean |
equals(Object o)
|
String |
getEncodedName()
|
org.apache.hadoop.io.Text |
getEndKey()
|
long |
getRegionId()
|
org.apache.hadoop.io.Text |
getRegionName()
|
org.apache.hadoop.io.Text |
getStartKey()
|
HTableDescriptor |
getTableDesc()
|
static org.apache.hadoop.io.Text |
getTableNameFromRegionName(org.apache.hadoop.io.Text regionName)
Extracts table name prefix from a region name. |
int |
hashCode()
|
boolean |
isMetaRegion()
|
boolean |
isMetaTable()
|
boolean |
isOffline()
|
boolean |
isRootRegion()
|
boolean |
isSplit()
|
void |
readFields(DataInput in)
|
void |
setOffline(boolean offLine)
|
void |
setSplit(boolean split)
|
String |
toString()
|
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final HRegionInfo rootRegionInfo
public static final HRegionInfo firstMetaRegionInfo
Constructor Detail |
---|
public HRegionInfo()
public HRegionInfo(HTableDescriptor tableDesc, org.apache.hadoop.io.Text startKey, org.apache.hadoop.io.Text endKey) throws IllegalArgumentException
tableDesc
- the table descriptorstartKey
- first key in regionendKey
- end of key range
IllegalArgumentException
public HRegionInfo(HTableDescriptor tableDesc, org.apache.hadoop.io.Text startKey, org.apache.hadoop.io.Text endKey, boolean split) throws IllegalArgumentException
tableDesc
- 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 String encodeRegionName(org.apache.hadoop.io.Text regionName)
regionName
-
public static org.apache.hadoop.io.Text getTableNameFromRegionName(org.apache.hadoop.io.Text regionName)
regionName
- A region name.
public org.apache.hadoop.io.Text getEndKey()
public long getRegionId()
public org.apache.hadoop.io.Text getRegionName()
public String getEncodedName()
public org.apache.hadoop.io.Text getStartKey()
public HTableDescriptor getTableDesc()
public boolean isRootRegion()
public boolean isMetaTable()
public boolean isMetaRegion()
public boolean isSplit()
public void setSplit(boolean split)
split
- set split statuspublic boolean isOffline()
public void setOffline(boolean offLine)
offLine
- set online - offline statuspublic 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
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
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 |