|
||||||||||
| 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.migration.HRegionInfo090x
public class HRegionInfo090x
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 HRegionInfo090x |
FIRST_META_REGIONINFO
HRegionInfo for first meta region |
static int |
MD5_HEX_LENGTH
|
static String |
NO_HASH
|
static HRegionInfo090x |
ROOT_REGIONINFO
HRegionInfo for root region |
protected HTableDescriptor |
tableDesc
|
| Constructor Summary | |
|---|---|
HRegionInfo090x()
Default constructor - creates empty object |
|
HRegionInfo090x(HRegionInfo090x other)
Costruct a copy of another HRegionInfo |
|
HRegionInfo090x(HTableDescriptor tableDesc,
byte[] startKey,
byte[] endKey)
Construct HRegionInfo with explicit parameters |
|
HRegionInfo090x(HTableDescriptor tableDesc,
byte[] startKey,
byte[] endKey,
boolean split)
Construct HRegionInfo with explicit parameters |
|
HRegionInfo090x(HTableDescriptor tableDesc,
byte[] startKey,
byte[] endKey,
boolean split,
long regionid)
Construct HRegionInfo with explicit parameters |
|
| Method Summary | |
|---|---|
int |
compareTo(HRegionInfo090x o)
|
boolean |
containsRange(byte[] rangeStartKey,
byte[] rangeEndKey)
Returns true if the given inclusive range of rows is fully contained by this region. |
boolean |
containsRow(byte[] row)
Return true if the given row falls in this region. |
static byte[] |
createRegionName(byte[] tableName,
byte[] startKey,
byte[] id,
boolean newFormat)
Make a region name of passed parameters. |
static byte[] |
createRegionName(byte[] tableName,
byte[] startKey,
long regionid,
boolean newFormat)
Make a region name of passed parameters. |
static byte[] |
createRegionName(byte[] tableName,
byte[] startKey,
String id,
boolean newFormat)
Make a region name of passed parameters. |
static String |
encodeRegionName(byte[] regionName)
|
boolean |
equals(Object o)
|
KeyValue.KVComparator |
getComparator()
|
String |
getEncodedName()
|
byte[] |
getEncodedNameAsBytes()
|
byte[] |
getEndKey()
|
long |
getRegionId()
|
byte[] |
getRegionName()
|
String |
getRegionNameAsString()
|
byte[] |
getStartKey()
|
HTableDescriptor |
getTableDesc()
|
static byte[] |
getTableName(byte[] regionName)
Gets the table name from the specified region name. |
byte |
getVersion()
|
int |
hashCode()
|
boolean |
isMetaRegion()
|
boolean |
isMetaTable()
|
boolean |
isOffline()
|
boolean |
isRootRegion()
|
boolean |
isSplit()
|
boolean |
isSplitParent()
|
static byte[][] |
parseRegionName(byte[] regionName)
Separate elements of a regionName. |
static String |
prettyPrint(String encodedRegionName)
Use logging. |
void |
readFields(DataInput in)
|
void |
setOffline(boolean offLine)
The parent of a region split is offline while split daughters hold references to the parent. |
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 MD5_HEX_LENGTH
public static final int DELIMITER
public static final HRegionInfo090x ROOT_REGIONINFO
public static final HRegionInfo090x FIRST_META_REGIONINFO
protected HTableDescriptor tableDesc
public static final String NO_HASH
| Constructor Detail |
|---|
public HRegionInfo090x()
public HRegionInfo090x(HTableDescriptor tableDesc,
byte[] startKey,
byte[] endKey)
throws IllegalArgumentException
tableDesc - the table descriptorstartKey - first key in regionendKey - end of key range
IllegalArgumentException
public HRegionInfo090x(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 HRegionInfo090x(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.
IllegalArgumentExceptionpublic HRegionInfo090x(HRegionInfo090x other)
other - | Method Detail |
|---|
public static String encodeRegionName(byte[] regionName)
regionName -
public static String prettyPrint(String encodedRegionName)
encodedRegionName - The encoded regionname.
-ROOT- if passed 70236052 or
.META. if passed 1028785192 else returns
encodedRegionName
public static byte[] createRegionName(byte[] tableName,
byte[] startKey,
long regionid,
boolean newFormat)
tableName - startKey - 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?).
public static byte[] createRegionName(byte[] tableName,
byte[] startKey,
String id,
boolean newFormat)
tableName - startKey - 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?).
public static byte[] createRegionName(byte[] tableName,
byte[] startKey,
byte[] id,
boolean newFormat)
tableName - startKey - 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?).
public static byte[] getTableName(byte[] regionName)
regionName -
public static byte[][] parseRegionName(byte[] regionName)
throws IOException
regionName -
IOExceptionpublic long getRegionId()
public byte[] getRegionName()
getRegionNameAsString()public String getRegionNameAsString()
public String getEncodedName()
public byte[] getEncodedNameAsBytes()
public byte[] getStartKey()
public byte[] getEndKey()
public boolean containsRange(byte[] rangeStartKey,
byte[] rangeEndKey)
IllegalArgumentException - if the range passed is invalid (ie end < start)public boolean containsRow(byte[] row)
public HTableDescriptor getTableDesc()
public void setTableDesc(HTableDescriptor newDesc)
newDesc - new table descriptor to usepublic boolean isRootRegion()
public boolean isMetaTable()
.META. or -ROOT-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 status.public boolean isSplitParent()
public String toString()
toString in class ObjectObject.toString()public boolean equals(Object o)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()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.Writablewrite in class org.apache.hadoop.io.VersionedWritableIOException
public void readFields(DataInput in)
throws IOException
readFields in interface org.apache.hadoop.io.WritablereadFields in class org.apache.hadoop.io.VersionedWritableIOExceptionpublic int compareTo(HRegionInfo090x o)
compareTo in interface Comparable<HRegionInfo090x>public KeyValue.KVComparator getComparator()
KeyValues.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||