public class HBaseAdmin1_0 extends Object implements AdminMask
| Constructor and Description |
|---|
HBaseAdmin1_0(org.apache.hadoop.hbase.client.Admin adm) |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(String tableString,
org.apache.hadoop.hbase.HColumnDescriptor columnDescriptor) |
void |
clearTable(String tableString,
long timestamp)
Delete all rows from the given table.
|
void |
close() |
void |
createTable(org.apache.hadoop.hbase.HTableDescriptor desc) |
void |
createTable(org.apache.hadoop.hbase.HTableDescriptor desc,
byte[] startKey,
byte[] endKey,
int numRegions) |
void |
deleteSnapshot(String snapshotName) |
void |
disableTable(String tableString) |
void |
dropTable(String tableString)
Drop given table.
|
void |
enableTable(String tableString) |
int |
getEstimatedRegionServerCount()
Estimate the number of regionservers in the HBase cluster.
|
org.apache.hadoop.hbase.HTableDescriptor |
getTableDescriptor(String tableString) |
boolean |
isTableDisabled(String tableString) |
void |
snapshot(String snapshotName,
String table) |
boolean |
tableExists(String tableString) |
public void clearTable(String tableString, long timestamp) throws IOException
clearTable in interface AdminMasktableString - timestamp - IOExceptionpublic void dropTable(String tableString) throws IOException
AdminMaskdropTable in interface AdminMasktableString - Name of the table to deleteIOExceptionpublic org.apache.hadoop.hbase.HTableDescriptor getTableDescriptor(String tableString) throws IOException
getTableDescriptor in interface AdminMaskIOExceptionpublic boolean tableExists(String tableString) throws IOException
tableExists in interface AdminMaskIOExceptionpublic void createTable(org.apache.hadoop.hbase.HTableDescriptor desc)
throws IOException
createTable in interface AdminMaskIOExceptionpublic void createTable(org.apache.hadoop.hbase.HTableDescriptor desc,
byte[] startKey,
byte[] endKey,
int numRegions)
throws IOException
createTable in interface AdminMaskIOExceptionpublic int getEstimatedRegionServerCount()
AdminMaskAdmin.getClusterStatus() and then
ClusterStatus.getServers() and finally size() on the
returned server list.getEstimatedRegionServerCount in interface AdminMaskpublic void disableTable(String tableString) throws IOException
disableTable in interface AdminMaskIOExceptionpublic void enableTable(String tableString) throws IOException
enableTable in interface AdminMaskIOExceptionpublic boolean isTableDisabled(String tableString) throws IOException
isTableDisabled in interface AdminMaskIOExceptionpublic void addColumn(String tableString, org.apache.hadoop.hbase.HColumnDescriptor columnDescriptor) throws IOException
addColumn in interface AdminMaskIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void snapshot(String snapshotName, String table) throws IllegalArgumentException, IOException
snapshot in interface AdminMaskIllegalArgumentExceptionIOExceptionpublic void deleteSnapshot(String snapshotName) throws IOException
deleteSnapshot in interface AdminMaskIOExceptionCopyright © 2012–2023. All rights reserved.