|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.util.migration.v5.HTableDescriptor
public class HTableDescriptor
HTableDescriptor contains the name of an HTable, and its column families.
| Field Summary | |
|---|---|
static String |
FAMILIES
|
static HTableDescriptor |
META_TABLEDESC
Table descriptor for .META. catalog table |
static HTableDescriptor |
ROOT_TABLEDESC
Table descriptor for |
| Constructor Summary | |
|---|---|
HTableDescriptor()
Constructs an empty object. |
|
HTableDescriptor(byte[] name)
Constructor. |
|
HTableDescriptor(String name)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addFamily(HColumnDescriptor family)
Adds a column family. |
int |
compareTo(Object o)
|
boolean |
equals(Object obj)
|
Collection<HColumnDescriptor> |
getFamilies()
|
HColumnDescriptor |
getFamily(byte[] column)
|
byte[] |
getName()
|
String |
getNameAsString()
|
static org.apache.hadoop.fs.Path |
getTableDir(org.apache.hadoop.fs.Path rootdir,
byte[] tableName)
|
boolean |
hasFamily(byte[] c)
Checks to see if this table contains the given column family |
boolean |
hasFamily(byte[] c,
int index)
Checks to see if this table contains the given column family |
int |
hashCode()
|
static byte[] |
isLegalTableName(byte[] b)
Check passed buffer is legal user-space table name. |
boolean |
isMetaRegion()
|
boolean |
isMetaTable()
|
boolean |
isRootRegion()
|
void |
readFields(DataInput in)
|
HColumnDescriptor |
removeFamily(byte[] column)
|
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 HTableDescriptor ROOT_TABLEDESC
public static final HTableDescriptor META_TABLEDESC
.META. catalog table
public static final String FAMILIES
| Constructor Detail |
|---|
public HTableDescriptor()
HTableDescriptor(byte[])public HTableDescriptor(String name)
name - Table name.
IllegalArgumentException - if passed a table name
that is made of other than 'word' characters, underscore or period: i.e.
[a-zA-Z_0-9.].- See Also:
- HADOOP-1581 HBASE: Un-openable tablename bug
public HTableDescriptor(byte[] name)
name - Table name.
IllegalArgumentException - if passed a table name
that is made of other than 'word' characters, underscore or period: i.e.
[a-zA-Z_0-9.].- See Also:
- HADOOP-1581 HBASE: Un-openable tablename bug
| Method Detail |
|---|
public static byte[] isLegalTableName(byte[] b)
b - Table name.
b param
NullPointerException - If passed b is null
IllegalArgumentException - if passed a table name
that is made of other than 'word' characters or underscores: i.e.
[a-zA-Z_0-9].public boolean isRootRegion()
public boolean isMetaTable()
public boolean isMetaRegion()
public byte[] getName()
public String getNameAsString()
public void addFamily(HColumnDescriptor family)
family - HColumnDescriptor of familyto add.public boolean hasFamily(byte[] c)
c - Family name or column name.
public boolean hasFamily(byte[] c,
int index)
c - Family name or column name.index - Index to column family delimiter
public String toString()
toString in class ObjectgetNameAsString()public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
public void write(DataOutput out)
throws IOException
write in interface org.apache.hadoop.io.WritableIOException
public void readFields(DataInput in)
throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic int compareTo(Object o)
compareTo in interface Comparablepublic Collection<HColumnDescriptor> getFamilies()
public HColumnDescriptor getFamily(byte[] column)
column -
public HColumnDescriptor removeFamily(byte[] column)
column -
public static org.apache.hadoop.fs.Path getTableDir(org.apache.hadoop.fs.Path rootdir,
byte[] tableName)
rootdir - qualified path of HBase root directorytableName - name of table
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||