Database Reference
In-Depth Information
Table name methods
Getters methods provided to access the name of the table as either
byte[]
or
String
are as follows:
byte[] getName();
String getNameAsString();
Column family methods
The
HTableDescriptor
class which is a class of
TableDescriptor
, provides methods
to specify the column families to be used with the table, and they are as follows:
•
void addFamily(HColumnDescriptor family)
: This adds a column family
to the table description
•
boolean hasFamily(byte[] c)
: This checks whether the table descriptor
contains the given column family
•
HColumnDescriptor[] getColumnFamilies()
: This returns an array
of the
HColumnDescriptor
object for the column families of the table
•
HColumnDescriptor getFamily(byte[]column)
: This returns the
HColumnDescriptor
object for a speciic column family name speciied
as the parameter
•
HColumnDescriptor removeFamily(byte[] column)
: This removes the
HColumnDescriptor
object from the table description for the column family
name speciied by the parameter
Other methods
The
HTableDescriptor
class also provides other useful methods to specify the
maximum size for a region within the table to get the MemStore size and so on.
The following is the list of some important methods:
long getMaxFileSize();
void setMaxFileSize(long maxFileSize);
The getter and setter is set for the maximum size up to which a region can grow,
the maximum size helps the system to split regions when they reach the maximum
conigured size.