com.google.cloud.bigtable.hbase2_x
Class BigtableAdmin
- java.lang.Object
-
- org.apache.hadoop.hbase.client.AbstractBigtableAdmin
-
- com.google.cloud.bigtable.hbase2_x.BigtableAdmin
-
- All Implemented Interfaces:
- Closeable, AutoCloseable, Abortable, Admin
public class BigtableAdmin extends AbstractBigtableAdmin
HBase 2.x specific implementation ofAbstractBigtableAdmin
.- Author:
- spollapally
-
-
Field Summary
-
Fields inherited from class org.apache.hadoop.hbase.client.AbstractBigtableAdmin
bigtableInstanceName, connection, LOG, tableAdapter, tableAdminClientWrapper
-
-
Constructor Summary
Constructors Constructor and Description BigtableAdmin(AbstractBigtableConnection connection)
-
Method Summary
-
Methods inherited from class org.apache.hadoop.hbase.client.AbstractBigtableAdmin
abort, addColumn, addColumn, assign, balancer, cloneSnapshot, cloneSnapshot, cloneSnapshot, close, closeRegion, closeRegion, closeRegion, closeRegionWithEncodedRegionName, compact, compact, compactRegion, compactRegion, compactRegionServer, convertToTableExistsException, coprocessorService, coprocessorService, createNamespace, createSplitKeys, createTable, createTable, createTable, createTable, createTableAsync, createTableAsync, deleteColumn, deleteColumn, deleteColumn, deleteNamespace, deleteRowRangeByPrefix, deleteSnapshot, deleteSnapshot, deleteSnapshots, deleteSnapshots, deleteTable, deleteTables, deleteTables, deleteTableSnapshots, deleteTableSnapshots, disableTable, disableTable, disableTables, disableTables, enableCatalogJanitor, enableTable, enableTable, enableTables, enableTables, execProcedure, execProcedureWithRet, flush, flushRegion, getAlterStatus, getAlterStatus, getAlterStatus, getClusterName, getClusterStatus, getConfiguration, getConnection, getMasterCoprocessors, getMasterInfoPort, getNamespaceDescriptor, getOnlineRegions, getOperationTimeout, getSnapshotClusterName, getTableDescriptor, getTableDescriptors, getTableDescriptorsByTableName, getTableNames, getTableRegions, isAborted, isCatalogJanitorEnabled, isProcedureFinished, isTableAvailable, isTableAvailable, isTableDisabled, isTableDisabled, isTableEnabled, isTableEnabled, listNamespaceDescriptors, listTableDescriptorsByNamespace, listTableNames, listTableNames, listTableNames, listTableNames, listTableNames, listTableNamesByNamespace, listTables, listTables, listTables, listTables, listTables, majorCompact, majorCompact, majorCompactRegion, majorCompactRegion, mergeRegions, modifyColumn, modifyColumns, modifyColumns, modifyNamespace, modifyTable, move, offline, restoreSnapshot, restoreSnapshot, restoreSnapshot, restoreSnapshot, rollWALWriter, runCatalogScan, setBalancerRunning, shutdown, snapshot, snapshot, snapshot, snapshotTable, split, split, splitRegion, splitRegion, stopMaster, stopRegionServer, tableExists, tableExists, toString, truncateTable, unassign, updateConfiguration, updateConfiguration
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.hadoop.hbase.client.Admin
addColumn, addReplicationPeer, balancer, getBackupMasters, getClusterMetrics, getMaster, getMasterCoprocessorNames, getRegionMetrics, getRegionServers, isSplitOrMergeEnabled, modifyColumn, setCleanerChoreRunning, setNormalizerRunning, setSplitOrMergeEnabled, takeSnapshotAsync
-
-
-
-
Constructor Detail
-
BigtableAdmin
public BigtableAdmin(AbstractBigtableConnection connection) throws IOException
- Throws:
IOException
-
-
Method Detail
-
createTable
public void createTable(TableDescriptor desc) throws IOException
- Throws:
IOException
-
createTable
public void createTable(TableDescriptor desc, byte[] startKey, byte[] endKey, int numRegions) throws IOException
- Throws:
IOException
-
createTable
public void createTable(TableDescriptor desc, byte[][] splitKeys) throws IOException
- Throws:
IOException
-
createTableAsync
public Future<Void> createTableAsync(TableDescriptor desc, byte[][] splitKeys) throws IOException
- Throws:
IOException
-
listSnapshots
public List<SnapshotDescription> listSnapshots(String regex) throws IOException
- Throws:
IOException
-
listSnapshots
public List<SnapshotDescription> listSnapshots(Pattern pattern) throws IOException
- Throws:
IOException
-
listSnapshots
public List<SnapshotDescription> listSnapshots() throws IOException
- Throws:
IOException
-
addColumnFamily
public void addColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamilyDesc) throws IOException
Calling
Admin.addColumn(TableName, ColumnFamilyDescriptor)
was causing stackoverflow. Copying the same code here. //TODO - need to find a better way- Throws:
IOException
-
modifyColumnFamily
public void modifyColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamilyDesc) throws IOException
Calling
Admin.addColumn(TableName, ColumnFamilyDescriptor)
was causing stackoverflow. Copying the same code here. //TODO - need to find a better way- Throws:
IOException
-
deleteNamespaceAsync
public Future<Void> deleteNamespaceAsync(String name) throws IOException
- Throws:
IOException
-
disableTableAsync
public Future<Void> disableTableAsync(TableName tableName) throws IOException
- Throws:
IOException
-
enableTableAsync
public Future<Void> enableTableAsync(TableName tableName) throws IOException
- Throws:
IOException
-
getDescriptor
public TableDescriptor getDescriptor(TableName tableName) throws IOException
- Throws:
IOException
-
snapshot
public void snapshot(SnapshotDescription snapshot) throws IOException, SnapshotCreationException, IllegalArgumentException
-
snapshot
public void snapshot(String snapshotName, TableName tableName, SnapshotType arg2) throws IOException, SnapshotCreationException, IllegalArgumentException
-
snapshotAsync
public void snapshotAsync(SnapshotDescription snapshot) throws IOException, SnapshotCreationException
- Throws:
IOException
SnapshotCreationException
-
addColumnFamilyAsync
public Future<Void> addColumnFamilyAsync(TableName tableName, ColumnFamilyDescriptor columnFamily)
-
deleteColumnFamily
public void deleteColumnFamily(TableName tableName, byte[] columnName) throws IOException
- Throws:
IOException
-
deleteColumnFamilyAsync
public Future<Void> deleteColumnFamilyAsync(TableName tableName, byte[] columnName)
-
deleteTableAsyncInternal
protected CompletableFuture<Void> deleteTableAsyncInternal(TableName tableName)
-
deleteTableAsync
public Future<Void> deleteTableAsync(TableName tableName) throws IOException
- Throws:
IOException
-
listTableDescriptors
public List<TableDescriptor> listTableDescriptors() throws IOException
- Throws:
IOException
-
listTableDescriptors
public List<TableDescriptor> listTableDescriptors(Pattern pattern) throws IOException
- Throws:
IOException
-
listTableDescriptors
public List<TableDescriptor> listTableDescriptors(List<TableName> tableNames) throws IOException
- Throws:
IOException
-
listTableDescriptors
public List<TableDescriptor> listTableDescriptors(Pattern pattern, boolean includeSysTables) throws IOException
- Throws:
IOException
-
listTableDescriptorsByNamespace
public List<TableDescriptor> listTableDescriptorsByNamespace(byte[] namespace) throws IOException
- Throws:
IOException
-
listTableSnapshots
public List<SnapshotDescription> listTableSnapshots(String tableName, String snapshotName) throws IOException
- Throws:
IOException
-
listTableSnapshots
public List<SnapshotDescription> listTableSnapshots(Pattern tableName, Pattern snapshotName) throws IOException
- Throws:
IOException
-
modifyColumnFamilyAsync
public Future<Void> modifyColumnFamilyAsync(TableName tableName, ColumnFamilyDescriptor columnFamily) throws IOException
- Throws:
IOException
-
modifyTable
public void modifyTable(TableDescriptor tableDescriptor) throws IOException
- Throws:
IOException
-
modifyTable
public void modifyTable(TableName tableName, TableDescriptor tableDescriptor) throws IOException
- Throws:
IOException
-
modifyTableAsync
public Future<Void> modifyTableAsync(TableDescriptor tableDescriptor) throws IOException
- Throws:
IOException
-
modifyTableAsync
public Future<Void> modifyTableAsync(TableName tableName, TableDescriptor newDescriptor)
-
truncateTableAsync
public Future<Void> truncateTableAsync(TableName tableName, boolean preserveSplits) throws IOException
- Throws:
IOException
-
abortProcedure
public boolean abortProcedure(long arg0, boolean arg1) throws IOException
- Throws:
IOException
-
abortProcedureAsync
public Future<Boolean> abortProcedureAsync(long arg0, boolean arg1) throws IOException
- Throws:
IOException
-
balance
public boolean balance() throws IOException
- Throws:
IOException
-
balance
public boolean balance(boolean arg0) throws IOException
- Throws:
IOException
-
balancerSwitch
public boolean balancerSwitch(boolean arg0, boolean arg1) throws IOException
- Throws:
IOException
-
catalogJanitorSwitch
public boolean catalogJanitorSwitch(boolean arg0) throws IOException
- Throws:
IOException
-
cleanerChoreSwitch
public boolean cleanerChoreSwitch(boolean arg0) throws IOException
- Throws:
IOException
-
clearCompactionQueues
public void clearCompactionQueues(ServerName arg0, Set<String> arg1) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
clearDeadServers
public List<ServerName> clearDeadServers(List<ServerName> arg0) throws IOException
- Throws:
IOException
-
cloneSnapshot
public void cloneSnapshot(String arg0, TableName arg1, boolean arg2) throws IOException, TableExistsException, RestoreSnapshotException
-
cloneSnapshotAsync
public Future<Void> cloneSnapshotAsync(String arg0, TableName arg1) throws IOException, TableExistsException
- Throws:
IOException
TableExistsException
-
compact
public void compact(TableName arg0, CompactType arg1) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
compact
public void compact(TableName arg0, byte[] arg1, CompactType arg2) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
createNamespaceAsync
public Future<Void> createNamespaceAsync(NamespaceDescriptor arg0) throws IOException
- Throws:
IOException
-
decommissionRegionServers
public void decommissionRegionServers(List<ServerName> arg0, boolean arg1) throws IOException
- Throws:
IOException
-
disableTableReplication
public void disableTableReplication(TableName arg0) throws IOException
- Throws:
IOException
-
enableTableReplication
public void enableTableReplication(TableName arg0) throws IOException
- Throws:
IOException
-
execProcedureWithReturn
public byte[] execProcedureWithReturn(String arg0, String arg1, Map<String,String> arg2) throws IOException
- Throws:
IOException
-
getCompactionState
public CompactionState getCompactionState(TableName arg0) throws IOException
- Throws:
IOException
-
getCompactionState
public CompactionState getCompactionState(TableName arg0, CompactType arg1) throws IOException
- Throws:
IOException
-
getCompactionStateForRegion
public CompactionState getCompactionStateForRegion(byte[] arg0) throws IOException
- Throws:
IOException
-
getLastMajorCompactionTimestamp
public long getLastMajorCompactionTimestamp(TableName arg0) throws IOException
- Throws:
IOException
-
getLastMajorCompactionTimestampForRegion
public long getLastMajorCompactionTimestampForRegion(byte[] arg0) throws IOException
- Throws:
IOException
-
getLocks
public String getLocks() throws IOException
- Throws:
IOException
-
getProcedures
public String getProcedures() throws IOException
- Throws:
IOException
-
getQuotaRetriever
public QuotaRetriever getQuotaRetriever(QuotaFilter arg0) throws IOException
- Throws:
IOException
-
getRegions
public List<RegionInfo> getRegions(ServerName arg0) throws IOException
- Throws:
IOException
-
flushRegionServer
public void flushRegionServer(ServerName serverName) throws IOException
- Throws:
IOException
-
getRegions
public List<RegionInfo> getRegions(TableName tableName) throws IOException
- Throws:
IOException
-
getSecurityCapabilities
public List<SecurityCapability> getSecurityCapabilities() throws IOException
- Throws:
IOException
-
isBalancerEnabled
public boolean isBalancerEnabled() throws IOException
- Throws:
IOException
-
isCleanerChoreEnabled
public boolean isCleanerChoreEnabled() throws IOException
- Throws:
IOException
-
isMasterInMaintenanceMode
public boolean isMasterInMaintenanceMode() throws IOException
- Throws:
IOException
-
isNormalizerEnabled
public boolean isNormalizerEnabled() throws IOException
- Throws:
IOException
-
isSnapshotFinished
public boolean isSnapshotFinished(SnapshotDescription arg0) throws IOException, HBaseSnapshotException, UnknownSnapshotException
-
listDeadServers
public List<ServerName> listDeadServers() throws IOException
- Throws:
IOException
-
listDecommissionedRegionServers
public List<ServerName> listDecommissionedRegionServers() throws IOException
- Throws:
IOException
-
listReplicatedTableCFs
public List<TableCFs> listReplicatedTableCFs() throws IOException
- Throws:
IOException
-
majorCompact
public void majorCompact(TableName arg0, CompactType arg1) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
majorCompact
public void majorCompact(TableName arg0, byte[] arg1, CompactType arg2) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
mergeRegionsAsync
public Future<Void> mergeRegionsAsync(byte[][] arg0, boolean arg1) throws IOException
- Throws:
IOException
-
mergeRegionsAsync
public Future<Void> mergeRegionsAsync(byte[] arg0, byte[] arg1, boolean arg2) throws IOException
- Throws:
IOException
-
modifyNamespaceAsync
public Future<Void> modifyNamespaceAsync(NamespaceDescriptor arg0) throws IOException
- Throws:
IOException
-
normalize
public boolean normalize() throws IOException
- Throws:
IOException
-
normalizerSwitch
public boolean normalizerSwitch(boolean arg0) throws IOException
- Throws:
IOException
-
recommissionRegionServer
public void recommissionRegionServer(ServerName arg0, List<byte[]> arg1) throws IOException
- Throws:
IOException
-
restoreSnapshot
public void restoreSnapshot(String arg0, boolean arg1, boolean arg2) throws IOException, RestoreSnapshotException
- Throws:
IOException
RestoreSnapshotException
-
restoreSnapshotAsync
public Future<Void> restoreSnapshotAsync(String arg0) throws IOException, RestoreSnapshotException
- Throws:
IOException
RestoreSnapshotException
-
runCatalogJanitor
public int runCatalogJanitor() throws IOException
- Throws:
IOException
-
runCleanerChore
public boolean runCleanerChore() throws IOException
- Throws:
IOException
-
setQuota
public void setQuota(QuotaSettings arg0) throws IOException
- Throws:
IOException
-
splitRegionAsync
public Future<Void> splitRegionAsync(byte[] arg0, byte[] arg1) throws IOException
- Throws:
IOException
-
addReplicationPeer
public void addReplicationPeer(String arg0, ReplicationPeerConfig arg1, boolean arg2) throws IOException
- Throws:
IOException
-
addReplicationPeerAsync
public Future<Void> addReplicationPeerAsync(String peerId, ReplicationPeerConfig peerConfig)
-
addReplicationPeerAsync
public Future<Void> addReplicationPeerAsync(String s, ReplicationPeerConfig replicationPeerConfig, boolean b)
-
appendReplicationPeerTableCFs
public void appendReplicationPeerTableCFs(String arg0, Map<TableName,List<String>> arg1) throws ReplicationException, IOException
- Throws:
ReplicationException
IOException
-
clearBlockCache
public CacheEvictionStats clearBlockCache(TableName arg0) throws IOException
- Throws:
IOException
-
compactRegionServer
public void compactRegionServer(ServerName arg0) throws IOException
- Throws:
IOException
-
disableReplicationPeer
public void disableReplicationPeer(String arg0) throws IOException
- Throws:
IOException
-
enableReplicationPeer
public void enableReplicationPeer(String arg0) throws IOException
- Throws:
IOException
-
getClusterMetrics
public ClusterMetrics getClusterMetrics(EnumSet<ClusterMetrics.Option> arg0) throws IOException
- Throws:
IOException
-
getQuota
public List<QuotaSettings> getQuota(QuotaFilter arg0) throws IOException
- Throws:
IOException
-
getRegionMetrics
public List<RegionMetrics> getRegionMetrics(ServerName arg0, TableName arg1) throws IOException
- Throws:
IOException
-
getReplicationPeerConfig
public ReplicationPeerConfig getReplicationPeerConfig(String arg0) throws IOException
- Throws:
IOException
-
isMergeEnabled
public boolean isMergeEnabled() throws IOException
- Throws:
IOException
-
isSplitEnabled
public boolean isSplitEnabled() throws IOException
- Throws:
IOException
-
listReplicationPeers
public List<ReplicationPeerDescription> listReplicationPeers() throws IOException
- Throws:
IOException
-
listReplicationPeers
public List<ReplicationPeerDescription> listReplicationPeers(Pattern arg0) throws IOException
- Throws:
IOException
-
majorCompactRegionServer
public void majorCompactRegionServer(ServerName arg0) throws IOException
- Throws:
IOException
-
mergeSwitch
public boolean mergeSwitch(boolean arg0, boolean arg1) throws IOException
- Throws:
IOException
-
removeReplicationPeer
public void removeReplicationPeer(String arg0) throws IOException
- Throws:
IOException
-
removeReplicationPeerTableCFs
public void removeReplicationPeerTableCFs(String arg0, Map<TableName,List<String>> arg1) throws ReplicationException, IOException
- Throws:
ReplicationException
IOException
-
splitSwitch
public boolean splitSwitch(boolean arg0, boolean arg1) throws IOException
- Throws:
IOException
-
updateReplicationPeerConfig
public void updateReplicationPeerConfig(String arg0, ReplicationPeerConfig arg1) throws IOException
- Throws:
IOException
-
updateReplicationPeerConfigAsync
public Future<Void> updateReplicationPeerConfigAsync(String s, ReplicationPeerConfig replicationPeerConfig)
-
-