Database Reference
In-Depth Information
This creates a new table but does not block and wait for it to come online
asynchronously.
Once you have created a table, the following helper functions can be used for
table related operations:
boolean tableExists(String tableName)
boolean tableExists(byte[] tableName)
The preceding methods check the existence of a table:
The HTableDescriptor[] listTables() command lists all the user space tables,
in other words, scans the hbase:meta table.
The HTableDescriptor getTableDescriptor(byte[] tableName) command
returns the instance of the HTableDescriptor class for the table.
void deleteTable(String tableName)
void deleteTable(byte[] tableName)
deleteTable(TableName tableName)
deleteTables(String regex)
deleteTables(Pattern pattern)
The preceding method deletes the table, takes the table name as a string or byte
array, and removes the table from the servers with all data deleted.
Before deletion, tables need to be disabled irst. The disabling operation notiies
every region server to lush any uncommitted data to the disk, closes the regions,
and updates the hbase:meta table so that no region of a targeted table gets deployed
to any servers. Disabling of a table can be performed using the following methods:
void disableTable(String tableName)
void disableTable(byte[] tableName)
disableTable(TableName tableName)
void disableTableAsync(String tableName)
void disableTableAsync(byte[] tableName)
disableTableAsync(TableName tableName)
disableTables(Pattern pattern)
Apart from table operation the HBaseAdmin class also exposes operations related
to clusters such as checking the status of the cluster or performing tasks on tables
and/or regions.
 
Search WWH ::




Custom Search