Admin.MasterSwitchType
Constructor and Description |
---|
AbstractBigtableAdmin(BigtableOptions options,
org.apache.hadoop.conf.Configuration configuration,
AbstractBigtableConnection connection,
BigtableTableAdminClient bigtableTableAdminClient,
Set<TableName> disabledTables)
Constructor for AbstractBigtableAdmin.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
abortProcedure, abortProcedureAsync, balancer, deleteTableSnapshots, deleteTableSnapshots, getLastMajorCompactionTimestamp, getLastMajorCompactionTimestampForRegion, getQuotaRetriever, getSecurityCapabilities, isBalancerEnabled, isNormalizerEnabled, isSplitOrMergeEnabled, listProcedures, listTableSnapshots, listTableSnapshots, normalize, setNormalizerRunning, setQuota, setSplitOrMergeEnabled
public AbstractBigtableAdmin(BigtableOptions options, org.apache.hadoop.conf.Configuration configuration, AbstractBigtableConnection connection, BigtableTableAdminClient bigtableTableAdminClient, Set<TableName> disabledTables)
Constructor for AbstractBigtableAdmin.
options
- a BigtableOptions
object.configuration
- a Configuration
object.connection
- a AbstractBigtableConnection
object.bigtableTableAdminClient
- a BigtableTableAdminClient
object.disabledTables
- a Set
object.public Connection getConnection()
getConnection
in interface Admin
public boolean tableExists(TableName tableName) throws IOException
tableExists
in interface Admin
IOException
@Deprecated public boolean tableExists(String tableName) throws IOException
tableExists.
tableName
- a String
object.IOException
- if any.public HTableDescriptor[] listTables() throws IOException
listTables
in interface Admin
IOException
public HTableDescriptor[] listTables(Pattern pattern) throws IOException
listTables
in interface Admin
IOException
public HTableDescriptor[] listTables(Pattern pattern, boolean includeSysTables) throws IOException
listTables
in interface Admin
IOException
@Deprecated public TableName[] listTableNames(String patternStr) throws IOException
listTableNames
in interface Admin
IOException
public TableName[] listTableNames(Pattern pattern) throws IOException
listTableNames
in interface Admin
IOException
public TableName[] listTableNames(Pattern pattern, boolean includeSysTables) throws IOException
listTableNames
in interface Admin
IOException
public TableName[] listTableNames(String regex, boolean includeSysTables) throws IOException
listTableNames
in interface Admin
IOException
public HTableDescriptor[] listTables(String regex) throws IOException
listTables
in interface Admin
IOException
public HTableDescriptor[] listTables(String regex, boolean includeSysTables) throws IOException
listTables
in interface Admin
IOException
public TableName[] listTableNames() throws IOException
listTableNames
in interface Admin
IOException
public HTableDescriptor getTableDescriptor(TableName tableName) throws TableNotFoundException, IOException
getTableDescriptor
in interface Admin
TableNotFoundException
IOException
@Deprecated public String[] getTableNames(String regex) throws IOException
getTableNames.
regex
- a String
object.String
objects.IOException
- if any.public void createTable(HTableDescriptor desc) throws IOException
createTable
in interface Admin
IOException
public void createTable(HTableDescriptor desc, byte[] startKey, byte[] endKey, int numRegions) throws IOException
createTable
in interface Admin
IOException
public void createTable(HTableDescriptor desc, byte[][] splitKeys) throws IOException
createTable
in interface Admin
IOException
public void createTableAsync(HTableDescriptor desc, byte[][] splitKeys) throws IOException
createTableAsync
in interface Admin
IOException
public void deleteTable(TableName tableName) throws IOException
deleteTable
in interface Admin
IOException
public HTableDescriptor[] deleteTables(String regex) throws IOException
deleteTables
in interface Admin
IOException
public HTableDescriptor[] deleteTables(Pattern pattern) throws IOException
deleteTables
in interface Admin
IOException
public void enableTable(TableName tableName) throws IOException
enableTable
in interface Admin
IOException
@Deprecated public void enableTable(String tableName) throws IOException
enableTable.
tableName
- a String
object.IOException
- if any.public void enableTableAsync(TableName tableName) throws IOException
enableTableAsync
in interface Admin
IOException
public HTableDescriptor[] enableTables(String regex) throws IOException
enableTables
in interface Admin
IOException
public HTableDescriptor[] enableTables(Pattern pattern) throws IOException
enableTables
in interface Admin
IOException
public void disableTableAsync(TableName tableName) throws IOException
disableTableAsync
in interface Admin
IOException
public void disableTable(TableName tableName) throws IOException
disableTable
in interface Admin
IOException
@Deprecated public void disableTable(String tableName) throws IOException
disableTable.
tableName
- a String
object.IOException
- if any.public HTableDescriptor[] disableTables(String regex) throws IOException
disableTables
in interface Admin
IOException
public HTableDescriptor[] disableTables(Pattern pattern) throws IOException
disableTables
in interface Admin
IOException
public boolean isTableEnabled(TableName tableName) throws IOException
isTableEnabled
in interface Admin
IOException
@Deprecated public boolean isTableEnabled(String tableName) throws IOException
isTableEnabled.
tableName
- a String
object.IOException
- if any.public boolean isTableDisabled(TableName tableName) throws IOException
isTableDisabled
in interface Admin
IOException
@Deprecated public boolean isTableDisabled(String tableName) throws IOException
isTableDisabled.
tableName
- a String
object.IOException
- if any.public boolean isTableAvailable(TableName tableName) throws IOException
isTableAvailable
in interface Admin
IOException
public void addColumn(TableName tableName, HColumnDescriptor column) throws IOException
addColumn
in interface Admin
IOException
public void modifyColumn(TableName tableName, HColumnDescriptor column) throws IOException
modifyColumn
in interface Admin
IOException
public void deleteColumn(TableName tableName, byte[] columnName) throws IOException
deleteColumn
in interface Admin
IOException
protected void modifyColumn(TableName tableName, String columnName, String modificationType, com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.Builder modification) throws IOException
modifyColumn.
tableName
- a TableName
object.columnName
- a String
object.modificationType
- a String
object.modification
- a ModifyColumnFamiliesRequest.Modification.Builder
object.IOException
- if any.@Deprecated public void addColumn(String tableName, HColumnDescriptor column) throws IOException
IOException
public void modifyColumn(String tableName, HColumnDescriptor descriptor) throws IOException
IOException
@Deprecated public void deleteColumn(String tableName, byte[] columnName) throws IOException
deleteColumn.
tableName
- a String
object.columnName
- an array of byte.IOException
- if any.@Deprecated public void deleteColumn(String tableName, String columnName) throws IOException
deleteColumn.
tableName
- a String
object.columnName
- a String
object.IOException
- if any.public ClusterStatus getClusterStatus() throws IOException
getClusterStatus
in interface Admin
IOException
public org.apache.hadoop.conf.Configuration getConfiguration()
getConfiguration
in interface Admin
public List<HRegionInfo> getTableRegions(TableName tableName) throws IOException
getTableRegions
in interface Admin
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Admin
IOException
public HTableDescriptor[] getTableDescriptorsByTableName(List<TableName> tableNames) throws IOException
getTableDescriptorsByTableName
in interface Admin
IOException
public int getOperationTimeout()
getOperationTimeout
in interface Admin
public boolean isAborted()
public void truncateTable(TableName tableName, boolean preserveSplits) throws IOException
truncateTable
in interface Admin
IOException
public void deleteRowRangeByPrefix(TableName tableName, byte[] prefix) throws IOException
deleteRowRangeByPrefix.
tableName
- a TableName
object.prefix
- an array of byte.IOException
- if any.public boolean isTableAvailable(TableName tableName, byte[][] splitKeys) throws IOException
isTableAvailable
in interface Admin
IOException
public Pair<Integer,Integer> getAlterStatus(TableName tableName) throws IOException
getAlterStatus
in interface Admin
IOException
public Pair<Integer,Integer> getAlterStatus(byte[] tableName) throws IOException
getAlterStatus
in interface Admin
IOException
public Pair<Integer,Integer> getAlterStatus(String tableName) throws IOException
getAlterStatus.
tableName
- a String
object.Pair
object.IOException
- if any.public void snapshot(String snapshotName, TableName tableName) throws IOException, SnapshotCreationException, IllegalArgumentException
snapshot
in interface Admin
IOException
SnapshotCreationException
IllegalArgumentException
public void snapshot(byte[] snapshotName, byte[] tableName) throws IOException, SnapshotCreationException, IllegalArgumentException
public void snapshot(byte[] snapshotName, TableName tableName) throws IOException, SnapshotCreationException, IllegalArgumentException
snapshot
in interface Admin
IOException
SnapshotCreationException
IllegalArgumentException
public void snapshot(String snapshotName, TableName tableName, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.Type type) throws IOException, SnapshotCreationException, IllegalArgumentException
snapshot
in interface Admin
IOException
SnapshotCreationException
IllegalArgumentException
public void snapshot(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot) throws IOException, SnapshotCreationException, IllegalArgumentException
snapshot
in interface Admin
IOException
SnapshotCreationException
IllegalArgumentException
public org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SnapshotResponse takeSnapshotAsync(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot) throws IOException, SnapshotCreationException
takeSnapshotAsync
in interface Admin
IOException
SnapshotCreationException
public void cloneSnapshot(byte[] snapshotName, byte[] tableName) throws IOException, TableExistsException, RestoreSnapshotException
public void cloneSnapshot(byte[] snapshotName, TableName tableName) throws IOException, TableExistsException, RestoreSnapshotException
cloneSnapshot
in interface Admin
IOException
TableExistsException
RestoreSnapshotException
public void cloneSnapshot(String snapshotName, TableName tableName) throws IOException, TableExistsException, RestoreSnapshotException
cloneSnapshot
in interface Admin
IOException
TableExistsException
RestoreSnapshotException
public List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription> listSnapshots() throws IOException
listSnapshots
in interface Admin
IOException
public List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription> listSnapshots(String regex) throws IOException
listSnapshots
in interface Admin
IOException
public List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription> listSnapshots(Pattern pattern) throws IOException
listSnapshots
in interface Admin
IOException
public void deleteSnapshot(byte[] snapshotName) throws IOException
deleteSnapshot
in interface Admin
IOException
public void deleteSnapshot(String snapshotName) throws IOException
deleteSnapshot
in interface Admin
IOException
public void deleteSnapshots(String regex) throws IOException
deleteSnapshots
in interface Admin
IOException
public void deleteSnapshots(Pattern pattern) throws IOException
deleteSnapshots
in interface Admin
IOException
public boolean isSnapshotFinished(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription snapshot) throws IOException, HBaseSnapshotException, UnknownSnapshotException
isSnapshotFinished
in interface Admin
IOException
HBaseSnapshotException
UnknownSnapshotException
public void restoreSnapshot(byte[] snapshotName) throws IOException, RestoreSnapshotException
restoreSnapshot
in interface Admin
IOException
RestoreSnapshotException
public void restoreSnapshot(String snapshotName) throws IOException, RestoreSnapshotException
restoreSnapshot
in interface Admin
IOException
RestoreSnapshotException
public void restoreSnapshot(byte[] snapshotName, boolean takeFailSafeSnapshot) throws IOException, RestoreSnapshotException
restoreSnapshot
in interface Admin
IOException
RestoreSnapshotException
public void restoreSnapshot(String snapshotName, boolean takeFailSafeSnapshot) throws IOException, RestoreSnapshotException
restoreSnapshot
in interface Admin
IOException
RestoreSnapshotException
public void closeRegion(String regionname, String serverName) throws IOException
closeRegion
in interface Admin
IOException
public void closeRegion(byte[] regionname, String serverName) throws IOException
closeRegion
in interface Admin
IOException
public boolean closeRegionWithEncodedRegionName(String encodedRegionName, String serverName) throws IOException
closeRegionWithEncodedRegionName
in interface Admin
IOException
public void closeRegion(ServerName sn, HRegionInfo hri) throws IOException
closeRegion
in interface Admin
IOException
public List<HRegionInfo> getOnlineRegions(ServerName sn) throws IOException
getOnlineRegions
in interface Admin
IOException
public void flush(TableName tableName) throws IOException
flush
in interface Admin
IOException
public void flushRegion(byte[] bytes) throws IOException
flushRegion
in interface Admin
IOException
public void compact(TableName tableName) throws IOException
compact
in interface Admin
IOException
public void compactRegion(byte[] bytes) throws IOException
compactRegion
in interface Admin
IOException
public void compact(TableName tableName, byte[] bytes) throws IOException
compact
in interface Admin
IOException
public void compactRegion(byte[] bytes, byte[] bytes2) throws IOException
compactRegion
in interface Admin
IOException
public void majorCompact(TableName tableName) throws IOException
majorCompact
in interface Admin
IOException
public void majorCompactRegion(byte[] bytes) throws IOException
majorCompactRegion
in interface Admin
IOException
public void majorCompact(TableName tableName, byte[] bytes) throws IOException
majorCompact
in interface Admin
IOException
public void majorCompactRegion(byte[] bytes, byte[] bytes2) throws IOException
majorCompactRegion
in interface Admin
IOException
public void compactRegionServer(ServerName serverName, boolean b) throws IOException
compactRegionServer
in interface Admin
IOException
public void move(byte[] encodedRegionName, byte[] destServerName) throws HBaseIOException, MasterNotRunningException, ZooKeeperConnectionException
move
in interface Admin
HBaseIOException
MasterNotRunningException
ZooKeeperConnectionException
public void assign(byte[] regionName) throws MasterNotRunningException, ZooKeeperConnectionException, IOException
assign
in interface Admin
MasterNotRunningException
ZooKeeperConnectionException
IOException
public void unassign(byte[] regionName, boolean force) throws MasterNotRunningException, ZooKeeperConnectionException, IOException
unassign
in interface Admin
MasterNotRunningException
ZooKeeperConnectionException
IOException
public void offline(byte[] regionName) throws IOException
offline
in interface Admin
IOException
public boolean setBalancerRunning(boolean on, boolean synchronous) throws MasterNotRunningException, ZooKeeperConnectionException
setBalancerRunning
in interface Admin
MasterNotRunningException
ZooKeeperConnectionException
public boolean balancer() throws MasterNotRunningException, ZooKeeperConnectionException
balancer
in interface Admin
MasterNotRunningException
ZooKeeperConnectionException
public boolean enableCatalogJanitor(boolean enable) throws MasterNotRunningException
enableCatalogJanitor
in interface Admin
MasterNotRunningException
public int runCatalogScan() throws MasterNotRunningException
runCatalogScan
in interface Admin
MasterNotRunningException
public boolean isCatalogJanitorEnabled() throws MasterNotRunningException
isCatalogJanitorEnabled
in interface Admin
MasterNotRunningException
public void mergeRegions(byte[] encodedNameOfRegionA, byte[] encodedNameOfRegionB, boolean forcible) throws IOException
mergeRegions
in interface Admin
IOException
public void split(TableName tableName) throws IOException
split
in interface Admin
IOException
public void splitRegion(byte[] bytes) throws IOException
splitRegion
in interface Admin
IOException
public void split(TableName tableName, byte[] bytes) throws IOException
split
in interface Admin
IOException
public void splitRegion(byte[] bytes, byte[] bytes2) throws IOException
splitRegion
in interface Admin
IOException
public void modifyTable(TableName tableName, HTableDescriptor htd) throws IOException
modifyTable
in interface Admin
IOException
public void shutdown() throws IOException
shutdown
in interface Admin
IOException
public void stopMaster() throws IOException
stopMaster
in interface Admin
IOException
public void stopRegionServer(String hostnamePort) throws IOException
stopRegionServer
in interface Admin
IOException
public void createNamespace(NamespaceDescriptor descriptor) throws IOException
createNamespace
in interface Admin
IOException
public void modifyNamespace(NamespaceDescriptor descriptor) throws IOException
modifyNamespace
in interface Admin
IOException
public void deleteNamespace(String name) throws IOException
deleteNamespace
in interface Admin
IOException
public NamespaceDescriptor getNamespaceDescriptor(String name) throws IOException
getNamespaceDescriptor
in interface Admin
IOException
public NamespaceDescriptor[] listNamespaceDescriptors() throws IOException
listNamespaceDescriptors
in interface Admin
IOException
public HTableDescriptor[] listTableDescriptorsByNamespace(String name) throws IOException
listTableDescriptorsByNamespace
in interface Admin
IOException
public TableName[] listTableNamesByNamespace(String name) throws IOException
listTableNamesByNamespace
in interface Admin
IOException
public HTableDescriptor[] getTableDescriptors(List<String> names) throws IOException
getTableDescriptors
in interface Admin
IOException
public String[] getMasterCoprocessors()
getMasterCoprocessors
in interface Admin
public org.apache.hadoop.hbase.protobuf.generated.AdminProtos.GetRegionInfoResponse.CompactionState getCompactionState(TableName tableName) throws IOException
getCompactionState
in interface Admin
IOException
public org.apache.hadoop.hbase.protobuf.generated.AdminProtos.GetRegionInfoResponse.CompactionState getCompactionStateForRegion(byte[] bytes) throws IOException
getCompactionStateForRegion
in interface Admin
IOException
public void execProcedure(String signature, String instance, Map<String,String> props) throws IOException
execProcedure
in interface Admin
IOException
public byte[] execProcedureWithRet(String signature, String instance, Map<String,String> props) throws IOException
execProcedureWithRet
in interface Admin
IOException
public boolean isProcedureFinished(String signature, String instance, Map<String,String> props) throws IOException
isProcedureFinished
in interface Admin
IOException
public CoprocessorRpcChannel coprocessorService()
coprocessorService
in interface Admin
public CoprocessorRpcChannel coprocessorService(ServerName serverName)
coprocessorService
in interface Admin
public void updateConfiguration(ServerName serverName) throws IOException
updateConfiguration
in interface Admin
IOException
public void updateConfiguration() throws IOException
updateConfiguration
in interface Admin
IOException
public int getMasterInfoPort() throws IOException
getMasterInfoPort
in interface Admin
IOException
public void rollWALWriter(ServerName serverName) throws IOException, FailedLogCloseException
rollWALWriter
in interface Admin
IOException
FailedLogCloseException