|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.client.HBaseAdmin
public class HBaseAdmin
Provides administrative functions for HBase
Constructor Summary | |
---|---|
HBaseAdmin(HBaseConfiguration conf)
Constructor |
Method Summary | |
---|---|
void |
addColumn(byte[] tableName,
HColumnDescriptor column)
Add a column to an existing table |
void |
addColumn(String tableName,
HColumnDescriptor column)
Add a column to an existing table |
static void |
checkHBaseAvailable(HBaseConfiguration conf)
Check to see if HBase is running. |
void |
createTable(HTableDescriptor desc)
Creates a new table |
void |
createTableAsync(HTableDescriptor desc)
Creates a new table but does not block and wait for it to come online. |
void |
deleteColumn(byte[] tableName,
byte[] columnName)
Delete a column from a table |
void |
deleteColumn(String tableName,
String columnName)
Delete a column from a table |
void |
deleteTable(byte[] tableName)
Deletes a table |
void |
deleteTable(String tableName)
Deletes a table |
void |
disableTable(byte[] tableName)
Disables a table (takes it off-line) If it is being served, the master will tell the servers to stop serving it. |
void |
disableTable(String tableName)
Disables a table (takes it off-line) If it is being served, the master will tell the servers to stop serving it. |
void |
enableTable(byte[] tableName)
Brings a table on-line (enables it) |
void |
enableTable(String tableName)
Brings a table on-line (enables it) |
HMasterInterface |
getMaster()
|
boolean |
isMasterRunning()
|
boolean |
isTableEnabled(byte[] tableName)
|
boolean |
isTableEnabled(String tableName)
|
HTableDescriptor[] |
listTables()
List all the userspace tables. |
void |
modifyColumn(byte[] tableName,
byte[] columnName,
HColumnDescriptor descriptor)
Modify an existing column family on a table |
void |
modifyColumn(String tableName,
String columnName,
HColumnDescriptor descriptor)
Modify an existing column family on a table |
void |
modifyTableMeta(byte[] tableName,
HTableDescriptor desc)
Modify a table's HTableDescriptor |
void |
shutdown()
Shuts down the HBase instance |
boolean |
tableExists(byte[] tableName)
|
boolean |
tableExists(String tableName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HBaseAdmin(HBaseConfiguration conf) throws MasterNotRunningException
conf
- Configuration object
MasterNotRunningException
Method Detail |
---|
public HMasterInterface getMaster() throws MasterNotRunningException
MasterNotRunningException
public boolean isMasterRunning()
public boolean tableExists(String tableName) throws MasterNotRunningException
tableName
- Table to check.
MasterNotRunningException
public boolean tableExists(byte[] tableName) throws MasterNotRunningException
tableName
- Table to check.
MasterNotRunningException
public HTableDescriptor[] listTables() throws IOException
IOException
public void createTable(HTableDescriptor desc) throws IOException
desc
- table descriptor for table
IllegalArgumentException
- if the table name is reserved
MasterNotRunningException
- if master is not running
TableExistsException
- if table already exists (If concurrent
threads, the table may have been created between test-for-existence
and attempt-at-creation).
IOException
public void createTableAsync(HTableDescriptor desc) throws IOException
desc
- table descriptor for table
IllegalArgumentException
- Bad table name.
MasterNotRunningException
- if master is not running
TableExistsException
- if table already exists (If concurrent
threads, the table may have been created between test-for-existence
and attempt-at-creation).
IOException
public void deleteTable(String tableName) throws IOException
tableName
- name of table to delete
IOException
public void deleteTable(byte[] tableName) throws IOException
tableName
- name of table to delete
IOException
public void enableTable(String tableName) throws IOException
tableName
- name of the table
IOException
public void enableTable(byte[] tableName) throws IOException
tableName
- name of the table
IOException
public void disableTable(String tableName) throws IOException
tableName
- name of table
IOException
public void disableTable(byte[] tableName) throws IOException
tableName
- name of table
IOException
public boolean isTableEnabled(String tableName) throws IOException
tableName
- name of table to check
IOException
public boolean isTableEnabled(byte[] tableName) throws IOException
tableName
- name of table to check
IOException
public void addColumn(String tableName, HColumnDescriptor column) throws IOException
tableName
- name of the table to add column tocolumn
- column descriptor of column to be added
IOException
public void addColumn(byte[] tableName, HColumnDescriptor column) throws IOException
tableName
- name of the table to add column tocolumn
- column descriptor of column to be added
IOException
public void deleteColumn(String tableName, String columnName) throws IOException
tableName
- name of tablecolumnName
- name of column to be deleted
IOException
public void deleteColumn(byte[] tableName, byte[] columnName) throws IOException
tableName
- name of tablecolumnName
- name of column to be deleted
IOException
public void modifyColumn(String tableName, String columnName, HColumnDescriptor descriptor) throws IOException
tableName
- name of tablecolumnName
- name of column to be modifieddescriptor
- new column descriptor to use
IOException
public void modifyColumn(byte[] tableName, byte[] columnName, HColumnDescriptor descriptor) throws IOException
tableName
- name of tablecolumnName
- name of column to be modifieddescriptor
- new column descriptor to use
IOException
public void modifyTableMeta(byte[] tableName, HTableDescriptor desc) throws IOException
tableName
- name of tabledesc
- the updated descriptor
IOException
public void shutdown() throws IOException
IOException
public static void checkHBaseAvailable(HBaseConfiguration conf) throws MasterNotRunningException
conf
-
MasterNotRunningException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |