|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.io.VersionedWritable
org.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 int |
DELIMITER
delimiter used between portions of a region name |
static HRegionInfo |
FIRST_META_REGIONINFO
HRegionInfo for first meta region |
static int |
NO_HASH
|
static HRegionInfo |
ROOT_REGIONINFO
HRegionInfo for root region |
protected HTableDescriptor |
tableDesc
|
Constructor Summary | |
---|---|
HRegionInfo()
Default constructor - creates empty object |
|
HRegionInfo(HRegionInfo other)
Costruct a copy of another HRegionInfo |
|
HRegionInfo(HTableDescriptor tableDesc,
byte[] startKey,
byte[] endKey)
Construct HRegionInfo with explicit parameters |
|
HRegionInfo(HTableDescriptor tableDesc,
byte[] startKey,
byte[] endKey,
boolean split)
Construct HRegionInfo with explicit parameters |
|
HRegionInfo(HTableDescriptor tableDesc,
byte[] startKey,
byte[] endKey,
boolean split,
long regionid)
Construct HRegionInfo with explicit parameters |
Method Summary | |
---|---|
int |
compareTo(Object o)
|
static byte[] |
createRegionName(byte[] tableName,
byte[] startKey,
byte[] id)
Make a region name of passed parameters. |
static byte[] |
createRegionName(byte[] tableName,
byte[] startKey,
String id)
Make a region name of passed parameters. |
static int |
encodeRegionName(byte[] regionName)
|
boolean |
equals(Object o)
|
int |
getEncodedName()
|
byte[] |
getEndKey()
|
long |
getRegionId()
|
byte[] |
getRegionName()
|
String |
getRegionNameAsString()
|
byte[] |
getStartKey()
|
HTableDescriptor |
getTableDesc()
|
byte |
getVersion()
|
int |
hashCode()
|
boolean |
isMetaRegion()
|
boolean |
isMetaTable()
|
boolean |
isOffline()
|
boolean |
isRootRegion()
|
boolean |
isSplit()
|
void |
readFields(DataInput in)
|
void |
setOffline(boolean offLine)
|
void |
setSplit(boolean split)
|
void |
setTableDesc(HTableDescriptor newDesc)
|
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 int DELIMITER
public static final HRegionInfo ROOT_REGIONINFO
public static final HRegionInfo FIRST_META_REGIONINFO
protected HTableDescriptor tableDesc
public static final int NO_HASH
Constructor Detail |
---|
public HRegionInfo()
public HRegionInfo(HTableDescriptor tableDesc, byte[] startKey, byte[] endKey) throws IllegalArgumentException
tableDesc
- the table descriptorstartKey
- first key in regionendKey
- end of key range
IllegalArgumentException
public HRegionInfo(HTableDescriptor tableDesc, byte[] startKey, byte[] 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
public HRegionInfo(HTableDescriptor tableDesc, byte[] startKey, byte[] endKey, boolean split, long regionid) 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.regionid
- Region id to use.
IllegalArgumentException
public HRegionInfo(HRegionInfo other)
other
- Method Detail |
---|
public static int encodeRegionName(byte[] regionName)
regionName
-
public static byte[] createRegionName(byte[] tableName, byte[] startKey, String id)
tableName
- startKey
- Can be nullid
- Region id.
public static byte[] createRegionName(byte[] tableName, byte[] startKey, byte[] id)
tableName
- startKey
- Can be nullid
- Region id
public byte[] getEndKey()
public long getRegionId()
public byte[] getRegionName()
getRegionNameAsString()
public String getRegionNameAsString()
public int getEncodedName()
public byte[] getStartKey()
public HTableDescriptor getTableDesc()
public void setTableDesc(HTableDescriptor newDesc)
newDesc
- new table descriptor to usepublic 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 byte getVersion()
getVersion
in class org.apache.hadoop.io.VersionedWritable
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
write
in class org.apache.hadoop.io.VersionedWritable
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class org.apache.hadoop.io.VersionedWritable
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 |