@InterfaceAudience.Private class AsyncHBaseAdmin extends Object implements AsyncAdmin
RawAsyncHBaseAdmin. The difference is that users need to provide a
thread pool when constructing this class, and the callback methods registered to the returned
CompletableFuture will be executed in this thread pool. So usually it is safe for users
to do anything they want in the callbacks without breaking the rpc framework.RawAsyncHBaseAdmin,
AsyncConnection.getAdmin(ExecutorService),
AsyncConnection.getAdminBuilder(ExecutorService)| Modifier and Type | Field and Description |
|---|---|
private ExecutorService |
pool |
private RawAsyncHBaseAdmin |
rawAdmin |
| Constructor and Description |
|---|
AsyncHBaseAdmin(RawAsyncHBaseAdmin rawAdmin,
ExecutorService pool) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Boolean> |
abortProcedure(long procId,
boolean mayInterruptIfRunning)
Abort a procedure Do not use.
|
CompletableFuture<Void> |
addColumnFamily(TableName tableName,
ColumnFamilyDescriptor columnFamily)
Add a column family to an existing table.
|
CompletableFuture<Void> |
addReplicationPeer(String peerId,
ReplicationPeerConfig peerConfig,
boolean enabled)
Add a new replication peer for replicating data to slave cluster
|
CompletableFuture<Void> |
appendReplicationPeerTableCFs(String peerId,
Map<TableName,List<String>> tableCfs)
Append the replicable table-cf config of the specified peer
|
CompletableFuture<Void> |
assign(byte[] regionName)
Assign an individual region.
|
CompletableFuture<BalanceResponse> |
balance(BalanceRequest request)
Invoke the balancer with the given balance request.
|
CompletableFuture<Boolean> |
balancerSwitch(boolean on,
boolean drainRITs)
Turn the load balancer on or off.
|
CompletableFuture<Boolean> |
catalogJanitorSwitch(boolean enabled)
Turn the catalog janitor on/off.
|
CompletableFuture<Boolean> |
cleanerChoreSwitch(boolean enabled)
Turn the cleaner chore on/off.
|
CompletableFuture<CacheEvictionStats> |
clearBlockCache(TableName tableName)
Clear all the blocks corresponding to this table from BlockCache.
|
CompletableFuture<Void> |
clearCompactionQueues(ServerName serverName,
Set<String> queues)
Clear compacting queues on a region server.
|
CompletableFuture<List<ServerName>> |
clearDeadServers(List<ServerName> servers)
Clear dead region servers from master.
|
CompletableFuture<List<Boolean>> |
clearSlowLogResponses(Set<ServerName> serverNames)
Clears online slow RPC logs from the provided list of RegionServers
|
CompletableFuture<Void> |
cloneSnapshot(String snapshotName,
TableName tableName,
boolean restoreAcl,
String customSFT)
Create a new table by cloning the snapshot content.
|
CompletableFuture<Void> |
cloneTableSchema(TableName tableName,
TableName newTableName,
boolean preserveSplits)
Create a new table by cloning the existent table schema.
|
CompletableFuture<Void> |
compact(TableName tableName,
byte[] columnFamily,
CompactType compactType)
Compact a column family within a table.
|
CompletableFuture<Void> |
compact(TableName tableName,
CompactType compactType)
Compact a table.
|
CompletableFuture<Map<ServerName,Boolean>> |
compactionSwitch(boolean switchState,
List<String> serverNamesList)
Turn the compaction on or off.
|
CompletableFuture<Void> |
compactRegion(byte[] regionName)
Compact an individual region.
|
CompletableFuture<Void> |
compactRegion(byte[] regionName,
byte[] columnFamily)
Compact a column family within a region.
|
CompletableFuture<Void> |
compactRegionServer(ServerName serverName)
Compact all regions on the region server.
|
<S,R> CompletableFuture<R> |
coprocessorService(Function<com.google.protobuf.RpcChannel,S> stubMaker,
ServiceCaller<S,R> callable)
Execute the given coprocessor call on the master.
|
<S,R> CompletableFuture<R> |
coprocessorService(Function<com.google.protobuf.RpcChannel,S> stubMaker,
ServiceCaller<S,R> callable,
ServerName serverName)
Execute the given coprocessor call on the given region server.
|
CompletableFuture<Void> |
createNamespace(NamespaceDescriptor descriptor)
Create a new namespace.
|
CompletableFuture<Void> |
createTable(TableDescriptor desc)
Creates a new table.
|
CompletableFuture<Void> |
createTable(TableDescriptor desc,
byte[][] splitKeys)
Creates a new table with an initial set of empty regions defined by the specified split keys.
|
CompletableFuture<Void> |
createTable(TableDescriptor desc,
byte[] startKey,
byte[] endKey,
int numRegions)
Creates a new table with the specified number of regions.
|
CompletableFuture<Void> |
decommissionRegionServers(List<ServerName> servers,
boolean offload)
Mark region server(s) as decommissioned to prevent additional regions from getting assigned to
them.
|
CompletableFuture<Void> |
deleteColumnFamily(TableName tableName,
byte[] columnFamily)
Delete a column family from a table.
|
CompletableFuture<Void> |
deleteNamespace(String name)
Delete an existing namespace.
|
CompletableFuture<Void> |
deleteSnapshot(String snapshotName)
Delete an existing snapshot.
|
CompletableFuture<Void> |
deleteSnapshots()
Delete all existing snapshots.
|
CompletableFuture<Void> |
deleteSnapshots(Pattern pattern)
Delete existing snapshots whose names match the pattern passed.
|
CompletableFuture<Void> |
deleteTable(TableName tableName)
Deletes a table.
|
CompletableFuture<Void> |
deleteTableSnapshots(Pattern tableNamePattern)
Delete all existing snapshots matching the given table name pattern.
|
CompletableFuture<Void> |
deleteTableSnapshots(Pattern tableNamePattern,
Pattern snapshotNamePattern)
Delete all existing snapshots matching the given table name regular expression and snapshot
name regular expression.
|
CompletableFuture<Void> |
disableReplicationPeer(String peerId)
Stop the replication stream to the specified peer
|
CompletableFuture<Void> |
disableTable(TableName tableName)
Disable a table.
|
CompletableFuture<Void> |
disableTableReplication(TableName tableName)
Disable a table's replication switch.
|
CompletableFuture<Void> |
enableReplicationPeer(String peerId)
Restart the replication stream to the specified peer
|
CompletableFuture<Void> |
enableTable(TableName tableName)
Enable a table.
|
CompletableFuture<Void> |
enableTableReplication(TableName tableName)
Enable a table's replication switch.
|
CompletableFuture<Boolean> |
exceedThrottleQuotaSwitch(boolean enable)
Switch the exceed throttle quota.
|
CompletableFuture<Void> |
execProcedure(String signature,
String instance,
Map<String,String> props)
Execute a distributed procedure on a cluster.
|
CompletableFuture<byte[]> |
execProcedureWithReturn(String signature,
String instance,
Map<String,String> props)
Execute a distributed procedure on a cluster.
|
CompletableFuture<Void> |
flush(TableName tableName)
Flush a table.
|
CompletableFuture<Void> |
flush(TableName tableName,
byte[] columnFamily)
Flush the specified column family stores on all regions of the passed table.
|
CompletableFuture<Void> |
flushMasterStore()
Flush master local region
|
CompletableFuture<Void> |
flushRegion(byte[] regionName)
Flush an individual region.
|
CompletableFuture<Void> |
flushRegion(byte[] regionName,
byte[] columnFamily)
Flush a column family within a region.
|
CompletableFuture<Void> |
flushRegionServer(ServerName sn)
Flush all region on the region server.
|
CompletableFuture<ClusterMetrics> |
getClusterMetrics()
Returns cluster status wrapped by
CompletableFuture |
CompletableFuture<ClusterMetrics> |
getClusterMetrics(EnumSet<ClusterMetrics.Option> options)
Returns cluster status wrapped by
CompletableFuture |
CompletableFuture<CompactionState> |
getCompactionState(TableName tableName,
CompactType compactType)
Get the current compaction state of a table.
|
CompletableFuture<CompactionState> |
getCompactionStateForRegion(byte[] regionName)
Get the current compaction state of region.
|
CompletableFuture<SpaceQuotaSnapshot> |
getCurrentSpaceQuotaSnapshot(String namespace)
Returns the Master's view of a quota on the given
namespace or null if the Master has
no quota information on that namespace. |
CompletableFuture<SpaceQuotaSnapshot> |
getCurrentSpaceQuotaSnapshot(TableName tableName)
Returns the Master's view of a quota on the given
tableName or null if the Master has
no quota information on that table. |
CompletableFuture<TableDescriptor> |
getDescriptor(TableName tableName)
Method for getting the tableDescriptor
|
CompletableFuture<Optional<Long>> |
getLastMajorCompactionTimestamp(TableName tableName)
Get the timestamp of the last major compaction for the passed table.
|
CompletableFuture<Optional<Long>> |
getLastMajorCompactionTimestampForRegion(byte[] regionName)
Get the timestamp of the last major compaction for the passed region.
|
CompletableFuture<String> |
getLocks()
List locks.
|
CompletableFuture<List<LogEntry>> |
getLogEntries(Set<ServerName> serverNames,
String logType,
ServerType serverType,
int limit,
Map<String,Object> filterParams)
Retrieve recent online records from HMaster / RegionServers.
|
CompletableFuture<NamespaceDescriptor> |
getNamespaceDescriptor(String name)
Get a namespace descriptor by name
|
CompletableFuture<String> |
getProcedures()
List procedures
|
CompletableFuture<List<QuotaSettings>> |
getQuota(QuotaFilter filter)
List the quotas based on the filter.
|
CompletableFuture<List<RegionMetrics>> |
getRegionMetrics(ServerName serverName)
Get a list of
RegionMetrics of all regions hosted on a region server. |
CompletableFuture<List<RegionMetrics>> |
getRegionMetrics(ServerName serverName,
TableName tableName)
Get a list of
RegionMetrics of all regions hosted on a region server for a table. |
CompletableFuture<List<RegionInfo>> |
getRegions(ServerName serverName)
Get all the online regions on a region server.
|
CompletableFuture<List<RegionInfo>> |
getRegions(TableName tableName)
Get the regions of a given table.
|
CompletableFuture<Map<TableName,SpaceQuotaSnapshot>> |
getRegionServerSpaceQuotaSnapshots(ServerName serverName)
Fetches the observed
SpaceQuotaSnapshotViews observed by a RegionServer. |
CompletableFuture<ReplicationPeerConfig> |
getReplicationPeerConfig(String peerId)
Returns the configured ReplicationPeerConfig for the specified peer
|
CompletableFuture<List<SecurityCapability>> |
getSecurityCapabilities()
Returns the list of supported security capabilities.
|
CompletableFuture<Map<TableName,Long>> |
getSpaceQuotaTableSizes()
Fetches the table sizes on the filesystem as tracked by the HBase Master.
|
CompletableFuture<List<UserPermission>> |
getUserPermissions(GetUserPermissionsRequest getUserPermissionsRequest)
Get the global/namespace/table permissions for user
|
CompletableFuture<Void> |
grant(UserPermission userPermission,
boolean mergeExistingPermissions)
Grants user specific permissions
|
CompletableFuture<List<Boolean>> |
hasUserPermissions(String userName,
List<Permission> permissions)
Check if the user has specific permissions
|
CompletableFuture<Boolean> |
isBalancerEnabled()
Query the current state of the balancer.
|
CompletableFuture<Boolean> |
isCatalogJanitorEnabled()
Query on the catalog janitor state.
|
CompletableFuture<Boolean> |
isCleanerChoreEnabled()
Query the current state of the cleaner chore.
|
CompletableFuture<Boolean> |
isMasterInMaintenanceMode()
Check whether master is in maintenance mode
|
CompletableFuture<Boolean> |
isMergeEnabled()
Query the current state of the Merge switch.
|
CompletableFuture<Boolean> |
isNormalizerEnabled()
Query the current state of the region normalizer
|
CompletableFuture<Boolean> |
isProcedureFinished(String signature,
String instance,
Map<String,String> props)
Check the current state of the specified procedure.
|
CompletableFuture<Boolean> |
isRpcThrottleEnabled()
Get if the rpc throttle is enabled.
|
CompletableFuture<Boolean> |
isSnapshotCleanupEnabled()
Query the current state of the auto snapshot cleanup based on TTL.
|
CompletableFuture<Boolean> |
isSnapshotFinished(SnapshotDescription snapshot)
Check the current state of the passed snapshot.
|
CompletableFuture<Boolean> |
isSplitEnabled()
Query the current state of the Split switch.
|
CompletableFuture<Boolean> |
isTableAvailable(TableName tableName)
Check if a table is available.
|
CompletableFuture<Boolean> |
isTableAvailable(TableName tableName,
byte[][] splitKeys)
Use this api to check if the table has been created with the specified number of splitkeys
which was used while creating the given table.
|
CompletableFuture<Boolean> |
isTableDisabled(TableName tableName)
Check if a table is disabled.
|
CompletableFuture<Boolean> |
isTableEnabled(TableName tableName)
Check if a table is enabled.
|
CompletableFuture<List<ServerName>> |
listDeadServers()
List all the dead region servers.
|
CompletableFuture<List<ServerName>> |
listDecommissionedRegionServers()
List region servers marked as decommissioned, which can not be assigned regions.
|
CompletableFuture<List<NamespaceDescriptor>> |
listNamespaceDescriptors()
List available namespace descriptors
|
CompletableFuture<List<String>> |
listNamespaces()
List available namespaces
|
CompletableFuture<List<TableCFs>> |
listReplicatedTableCFs()
Find all table and column families that are replicated from this cluster
|
CompletableFuture<List<ReplicationPeerDescription>> |
listReplicationPeers()
Return a list of replication peers.
|
CompletableFuture<List<ReplicationPeerDescription>> |
listReplicationPeers(Pattern pattern)
Return a list of replication peers.
|
CompletableFuture<List<SnapshotDescription>> |
listSnapshots()
List completed snapshots.
|
CompletableFuture<List<SnapshotDescription>> |
listSnapshots(Pattern pattern)
List all the completed snapshots matching the given pattern.
|
CompletableFuture<List<TableDescriptor>> |
listTableDescriptors(boolean includeSysTables)
List all the tables.
|
CompletableFuture<List<TableDescriptor>> |
listTableDescriptors(List<TableName> tableNames)
List specific tables including system tables.
|
CompletableFuture<List<TableDescriptor>> |
listTableDescriptors(Pattern pattern,
boolean includeSysTables)
List all the tables matching the given pattern.
|
CompletableFuture<List<TableDescriptor>> |
listTableDescriptorsByNamespace(String name)
Get list of table descriptors by namespace.
|
CompletableFuture<List<TableName>> |
listTableNames(boolean includeSysTables)
List all of the names of tables.
|
CompletableFuture<List<TableName>> |
listTableNames(Pattern pattern,
boolean includeSysTables)
List all of the names of userspace tables.
|
CompletableFuture<List<TableName>> |
listTableNamesByNamespace(String name)
Get list of table names by namespace.
|
CompletableFuture<List<SnapshotDescription>> |
listTableSnapshots(Pattern tableNamePattern)
List all the completed snapshots matching the given table name pattern.
|
CompletableFuture<List<SnapshotDescription>> |
listTableSnapshots(Pattern tableNamePattern,
Pattern snapshotNamePattern)
List all the completed snapshots matching the given table name regular expression and snapshot
name regular expression.
|
CompletableFuture<List<ServerName>> |
listUnknownServers()
List all the unknown region servers.
|
CompletableFuture<Void> |
majorCompact(TableName tableName,
byte[] columnFamily,
CompactType compactType)
Major compact a column family within a table.
|
CompletableFuture<Void> |
majorCompact(TableName tableName,
CompactType compactType)
Major compact a table.
|
CompletableFuture<Void> |
majorCompactRegion(byte[] regionName)
Major compact a region.
|
CompletableFuture<Void> |
majorCompactRegion(byte[] regionName,
byte[] columnFamily)
Major compact a column family within region.
|
CompletableFuture<Void> |
majorCompactRegionServer(ServerName serverName)
Compact all regions on the region server.
|
CompletableFuture<Void> |
mergeRegions(List<byte[]> nameOfRegionsToMerge,
boolean forcible)
Merge multiple regions (>=2).
|
CompletableFuture<Boolean> |
mergeSwitch(boolean enabled,
boolean drainMerges)
Turn the Merge switch on or off.
|
CompletableFuture<Void> |
modifyColumnFamily(TableName tableName,
ColumnFamilyDescriptor columnFamily)
Modify an existing column family on a table.
|
CompletableFuture<Void> |
modifyColumnFamilyStoreFileTracker(TableName tableName,
byte[] family,
String dstSFT)
Change the store file tracker of the given table's given family.
|
CompletableFuture<Void> |
modifyNamespace(NamespaceDescriptor descriptor)
Modify an existing namespace.
|
CompletableFuture<Void> |
modifyTable(TableDescriptor desc)
Modify an existing table, more IRB friendly version.
|
CompletableFuture<Void> |
modifyTableStoreFileTracker(TableName tableName,
String dstSFT)
Change the store file tracker of the given table.
|
CompletableFuture<Void> |
move(byte[] regionName)
Move the region
r to a random server. |
CompletableFuture<Void> |
move(byte[] regionName,
ServerName destServerName)
Move the region
r to dest. |
CompletableFuture<Boolean> |
normalize(NormalizeTableFilterParams ntfp)
Invoke region normalizer.
|
CompletableFuture<Boolean> |
normalizerSwitch(boolean on)
Set region normalizer on/off.
|
CompletableFuture<Void> |
offline(byte[] regionName)
Offline specified region from master's in-memory state.
|
CompletableFuture<Void> |
recommissionRegionServer(ServerName server,
List<byte[]> encodedRegionNames)
Remove decommission marker from a region server to allow regions assignments.
|
CompletableFuture<Void> |
removeReplicationPeer(String peerId)
Remove a peer and stop the replication
|
CompletableFuture<Void> |
removeReplicationPeerTableCFs(String peerId,
Map<TableName,List<String>> tableCfs)
Remove some table-cfs from config of the specified peer
|
CompletableFuture<Void> |
restoreSnapshot(String snapshotName)
Restore the specified snapshot on the original table.
|
CompletableFuture<Void> |
restoreSnapshot(String snapshotName,
boolean takeFailSafeSnapshot,
boolean restoreAcl)
Restore the specified snapshot on the original table.
|
CompletableFuture<Void> |
revoke(UserPermission userPermission)
Revokes user specific permissions
|
CompletableFuture<Void> |
rollWALWriter(ServerName serverName)
Roll the log writer.
|
CompletableFuture<Integer> |
runCatalogJanitor()
Ask for a scan of the catalog table.
|
CompletableFuture<Boolean> |
runCleanerChore()
Ask for cleaner chore to run.
|
CompletableFuture<Void> |
setQuota(QuotaSettings quota)
Apply the new quota settings.
|
CompletableFuture<Void> |
shutdown()
Shuts down the HBase cluster.
|
CompletableFuture<Void> |
snapshot(SnapshotDescription snapshot)
Take a snapshot and wait for the server to complete that snapshot asynchronously.
|
CompletableFuture<Boolean> |
snapshotCleanupSwitch(boolean on,
boolean sync)
Turn on or off the auto snapshot cleanup based on TTL.
|
CompletableFuture<Void> |
split(TableName tableName)
Split a table.
|
CompletableFuture<Void> |
split(TableName tableName,
byte[] splitPoint)
Split a table.
|
CompletableFuture<Void> |
splitRegion(byte[] regionName)
Split an individual region.
|
CompletableFuture<Void> |
splitRegion(byte[] regionName,
byte[] splitPoint)
Split an individual region.
|
CompletableFuture<Boolean> |
splitSwitch(boolean enabled,
boolean drainSplits)
Turn the Split switch on or off.
|
CompletableFuture<Void> |
stopMaster()
Shuts down the current HBase master only.
|
CompletableFuture<Void> |
stopRegionServer(ServerName serverName)
Stop the designated regionserver.
|
CompletableFuture<Boolean> |
switchRpcThrottle(boolean enable)
Switch the rpc throttle enabled state.
|
CompletableFuture<Boolean> |
tableExists(TableName tableName)
Check if a table exists.
|
CompletableFuture<Void> |
truncateTable(TableName tableName,
boolean preserveSplits)
Truncate a table.
|
CompletableFuture<Void> |
unassign(byte[] regionName)
Unassign a region from current hosting regionserver.
|
CompletableFuture<Void> |
updateConfiguration()
Update the configuration and trigger an online config change on all the masters and
regionservers.
|
CompletableFuture<Void> |
updateConfiguration(ServerName serverName)
Update the configuration and trigger an online config change on the regionserver.
|
CompletableFuture<Void> |
updateReplicationPeerConfig(String peerId,
ReplicationPeerConfig peerConfig)
Update the peerConfig for the specified peer
|
private <T> CompletableFuture<T> |
wrap(CompletableFuture<T> future) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddReplicationPeer, balance, balance, balancerSwitch, cloneSnapshot, cloneSnapshot, compact, compact, getBackupMasters, getCompactionState, getMaster, getMasterCoprocessorNames, getMasterInfoPort, getRegionServers, getRegionServers, getSlowLogResponses, hasUserPermissions, listTableDescriptors, listTableNames, majorCompact, majorCompact, mergeRegions, mergeSwitch, normalize, restoreSnapshot, snapshot, snapshot, splitSwitch, unassignprivate final RawAsyncHBaseAdmin rawAdmin
private final ExecutorService pool
AsyncHBaseAdmin(RawAsyncHBaseAdmin rawAdmin, ExecutorService pool)
private <T> CompletableFuture<T> wrap(CompletableFuture<T> future)
public CompletableFuture<Boolean> tableExists(TableName tableName)
AsyncAdmintableExists in interface AsyncAdmintableName - Table to check.CompletableFuture.public CompletableFuture<List<TableDescriptor>> listTableDescriptors(boolean includeSysTables)
AsyncAdminlistTableDescriptors in interface AsyncAdminincludeSysTables - False to match only against userspace tablesCompletableFuture.public CompletableFuture<List<TableDescriptor>> listTableDescriptors(Pattern pattern, boolean includeSysTables)
AsyncAdminlistTableDescriptors in interface AsyncAdminpattern - The compiled regular expression to match againstincludeSysTables - False to match only against userspace tablesCompletableFuture.public CompletableFuture<List<TableDescriptor>> listTableDescriptors(List<TableName> tableNames)
AsyncAdminlistTableDescriptors in interface AsyncAdmintableNames - the table list to match againstCompletableFuture.public CompletableFuture<List<TableDescriptor>> listTableDescriptorsByNamespace(String name)
AsyncAdminlistTableDescriptorsByNamespace in interface AsyncAdminname - namespace nameCompletableFuture.public CompletableFuture<List<TableName>> listTableNames(boolean includeSysTables)
AsyncAdminlistTableNames in interface AsyncAdminincludeSysTables - False to match only against userspace tablesCompletableFuture.public CompletableFuture<List<TableName>> listTableNames(Pattern pattern, boolean includeSysTables)
AsyncAdminlistTableNames in interface AsyncAdminpattern - The regular expression to match againstincludeSysTables - False to match only against userspace tablesCompletableFuture.public CompletableFuture<List<TableName>> listTableNamesByNamespace(String name)
AsyncAdminlistTableNamesByNamespace in interface AsyncAdminname - namespace nameCompletableFuture.public CompletableFuture<TableDescriptor> getDescriptor(TableName tableName)
AsyncAdmingetDescriptor in interface AsyncAdmintableName - as a TableNameCompletableFuture.public CompletableFuture<Void> createTable(TableDescriptor desc)
AsyncAdmincreateTable in interface AsyncAdmindesc - table descriptor for tablepublic CompletableFuture<Void> createTable(TableDescriptor desc, byte[] startKey, byte[] endKey, int numRegions)
AsyncAdmincreateTable in interface AsyncAdmindesc - table descriptor for tablestartKey - beginning of key rangeendKey - end of key rangenumRegions - the total number of regions to createpublic CompletableFuture<Void> createTable(TableDescriptor desc, byte[][] splitKeys)
AsyncAdmincreateTable in interface AsyncAdmindesc - table descriptor for tablesplitKeys - array of split keys for the initial regions of the tablepublic CompletableFuture<Void> modifyTable(TableDescriptor desc)
AsyncAdminmodifyTable in interface AsyncAdmindesc - modified description of the tablepublic CompletableFuture<Void> modifyTableStoreFileTracker(TableName tableName, String dstSFT)
AsyncAdminmodifyTableStoreFileTracker in interface AsyncAdmintableName - the table you want to changedstSFT - the destination store file trackerpublic CompletableFuture<Void> deleteTable(TableName tableName)
AsyncAdmindeleteTable in interface AsyncAdmintableName - name of table to deletepublic CompletableFuture<Void> truncateTable(TableName tableName, boolean preserveSplits)
AsyncAdmintruncateTable in interface AsyncAdmintableName - name of table to truncatepreserveSplits - True if the splits should be preservedpublic CompletableFuture<Void> enableTable(TableName tableName)
AsyncAdminenableTable in interface AsyncAdmintableName - name of the tablepublic CompletableFuture<Void> disableTable(TableName tableName)
AsyncAdmindisableTable in interface AsyncAdminpublic CompletableFuture<Boolean> isTableEnabled(TableName tableName)
AsyncAdminisTableEnabled in interface AsyncAdmintableName - name of table to checkCompletableFuture.public CompletableFuture<Boolean> isTableDisabled(TableName tableName)
AsyncAdminisTableDisabled in interface AsyncAdmintableName - name of table to checkCompletableFuture.public CompletableFuture<Boolean> isTableAvailable(TableName tableName)
AsyncAdminisTableAvailable in interface AsyncAdmintableName - name of table to checkCompletableFuture.public CompletableFuture<Boolean> isTableAvailable(TableName tableName, byte[][] splitKeys)
AsyncAdminCompletableFuture.isTableAvailable in interface AsyncAdmintableName - name of table to checksplitKeys - keys to check if the table has been created with all split keyspublic CompletableFuture<Void> addColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamily)
AsyncAdminaddColumnFamily in interface AsyncAdmintableName - name of the table to add column family tocolumnFamily - column family descriptor of column family to be addedpublic CompletableFuture<Void> deleteColumnFamily(TableName tableName, byte[] columnFamily)
AsyncAdmindeleteColumnFamily in interface AsyncAdmintableName - name of tablecolumnFamily - name of column family to be deletedpublic CompletableFuture<Void> modifyColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamily)
AsyncAdminmodifyColumnFamily in interface AsyncAdmintableName - name of tablecolumnFamily - new column family descriptor to usepublic CompletableFuture<Void> modifyColumnFamilyStoreFileTracker(TableName tableName, byte[] family, String dstSFT)
AsyncAdminmodifyColumnFamilyStoreFileTracker in interface AsyncAdmintableName - the table you want to changefamily - the family you want to changedstSFT - the destination store file trackerpublic CompletableFuture<Void> createNamespace(NamespaceDescriptor descriptor)
AsyncAdmincreateNamespace in interface AsyncAdmindescriptor - descriptor which describes the new namespacepublic CompletableFuture<Void> modifyNamespace(NamespaceDescriptor descriptor)
AsyncAdminmodifyNamespace in interface AsyncAdmindescriptor - descriptor which describes the new namespacepublic CompletableFuture<Void> deleteNamespace(String name)
AsyncAdmindeleteNamespace in interface AsyncAdminname - namespace namepublic CompletableFuture<NamespaceDescriptor> getNamespaceDescriptor(String name)
AsyncAdmingetNamespaceDescriptor in interface AsyncAdminname - name of namespace descriptorCompletableFuture.public CompletableFuture<List<String>> listNamespaces()
AsyncAdminlistNamespaces in interface AsyncAdminCompletableFuture.public CompletableFuture<List<NamespaceDescriptor>> listNamespaceDescriptors()
AsyncAdminlistNamespaceDescriptors in interface AsyncAdminCompletableFuture.public CompletableFuture<List<RegionInfo>> getRegions(ServerName serverName)
AsyncAdmingetRegions in interface AsyncAdminpublic CompletableFuture<List<RegionInfo>> getRegions(TableName tableName)
AsyncAdmingetRegions in interface AsyncAdminpublic CompletableFuture<Void> flush(TableName tableName)
AsyncAdminflush in interface AsyncAdmintableName - table to flushpublic CompletableFuture<Void> flush(TableName tableName, byte[] columnFamily)
AsyncAdminflush in interface AsyncAdmintableName - table to flushcolumnFamily - column family within a tablepublic CompletableFuture<Void> flushRegion(byte[] regionName)
AsyncAdminflushRegion in interface AsyncAdminregionName - region to flushpublic CompletableFuture<Void> flushRegion(byte[] regionName, byte[] columnFamily)
AsyncAdminflushRegion in interface AsyncAdminregionName - region to flushcolumnFamily - column family within a region. If not present, flush the region's all
column families.public CompletableFuture<Void> flushRegionServer(ServerName sn)
AsyncAdminflushRegionServer in interface AsyncAdminsn - server to flushpublic CompletableFuture<Void> compact(TableName tableName, CompactType compactType)
AsyncAdminTableNotFoundException if table not found for normal compaction
type.compact in interface AsyncAdmintableName - table to compactcompactType - CompactTypepublic CompletableFuture<Void> compact(TableName tableName, byte[] columnFamily, CompactType compactType)
AsyncAdminTableNotFoundException if table not found for
normal compaction type.compact in interface AsyncAdmintableName - table to compactcolumnFamily - column family within a tablecompactType - CompactTypepublic CompletableFuture<Void> compactRegion(byte[] regionName)
AsyncAdmincompactRegion in interface AsyncAdminregionName - region to compactpublic CompletableFuture<Void> compactRegion(byte[] regionName, byte[] columnFamily)
AsyncAdmincompactRegion in interface AsyncAdminregionName - region to compactcolumnFamily - column family within a region. If not present, compact the region's all
column families.public CompletableFuture<Void> majorCompact(TableName tableName, CompactType compactType)
AsyncAdminTableNotFoundException if table not found for normal compaction
type.majorCompact in interface AsyncAdmintableName - table to major compactcompactType - CompactTypepublic CompletableFuture<Void> majorCompact(TableName tableName, byte[] columnFamily, CompactType compactType)
AsyncAdminTableNotFoundException if table not found.majorCompact in interface AsyncAdmintableName - table to major compactcolumnFamily - column family within a table. If not present, major compact the table's all
column families.compactType - CompactTypepublic CompletableFuture<Void> majorCompactRegion(byte[] regionName)
AsyncAdminmajorCompactRegion in interface AsyncAdminregionName - region to major compactpublic CompletableFuture<Void> majorCompactRegion(byte[] regionName, byte[] columnFamily)
AsyncAdminmajorCompactRegion in interface AsyncAdminregionName - region to major compactcolumnFamily - column family within a region. If not present, major compact the region's
all column families.public CompletableFuture<Void> compactRegionServer(ServerName serverName)
AsyncAdmincompactRegionServer in interface AsyncAdminserverName - the region server namepublic CompletableFuture<Void> majorCompactRegionServer(ServerName serverName)
AsyncAdminmajorCompactRegionServer in interface AsyncAdminserverName - the region server namepublic CompletableFuture<Boolean> mergeSwitch(boolean enabled, boolean drainMerges)
AsyncAdmindrainMerges parameter only effects when will we complete the returned
CompletableFuture.mergeSwitch in interface AsyncAdminenabled - enabled or notdrainMerges - If true, it waits until current merge() call, if outstanding,
to return.CompletableFuturepublic CompletableFuture<Boolean> isMergeEnabled()
AsyncAdminisMergeEnabled in interface AsyncAdminCompletableFuturepublic CompletableFuture<Boolean> splitSwitch(boolean enabled, boolean drainSplits)
AsyncAdmindrainSplits parameter only effects when will we complete the returned
CompletableFuture.splitSwitch in interface AsyncAdminenabled - enabled or notdrainSplits - If true, it waits until current split() call, if outstanding,
to return.CompletableFuturepublic CompletableFuture<Boolean> isSplitEnabled()
AsyncAdminisSplitEnabled in interface AsyncAdminCompletableFuturepublic CompletableFuture<Void> mergeRegions(List<byte[]> nameOfRegionsToMerge, boolean forcible)
AsyncAdminmergeRegions in interface AsyncAdminnameOfRegionsToMerge - encoded or full name of daughter regionsforcible - true if do a compulsory merge, otherwise we will only merge two
adjacent regionspublic CompletableFuture<Void> split(TableName tableName)
AsyncAdminsplit in interface AsyncAdmintableName - table to splitpublic CompletableFuture<Void> split(TableName tableName, byte[] splitPoint)
AsyncAdminsplit in interface AsyncAdmintableName - table to splitsplitPoint - the explicit position to split onpublic CompletableFuture<Void> splitRegion(byte[] regionName)
AsyncAdminsplitRegion in interface AsyncAdminregionName - region to splitpublic CompletableFuture<Void> splitRegion(byte[] regionName, byte[] splitPoint)
AsyncAdminsplitRegion in interface AsyncAdminregionName - region to splitsplitPoint - the explicit position to split on. If not present, it will decide by region
server.public CompletableFuture<Void> assign(byte[] regionName)
AsyncAdminassign in interface AsyncAdminregionName - Encoded or full name of region to assign.public CompletableFuture<Void> unassign(byte[] regionName)
AsyncAdminAsyncAdmin.move(byte[], ServerName) if you want to control the region movement.unassign in interface AsyncAdminregionName - Encoded or full name of region to unassign.public CompletableFuture<Void> offline(byte[] regionName)
AsyncAdminoffline in interface AsyncAdminregionName - Encoded or full name of region to offlinepublic CompletableFuture<Void> move(byte[] regionName)
AsyncAdminr to a random server.move in interface AsyncAdminregionName - Encoded or full name of region to move.public CompletableFuture<Void> move(byte[] regionName, ServerName destServerName)
AsyncAdminr to dest.move in interface AsyncAdminregionName - Encoded or full name of region to move.destServerName - The servername of the destination regionserver. If not present, we'll
assign to a random server. A server name is made of host, port and
startcode. Here is an example:
host187.example.com,60020,1289493121758public CompletableFuture<Void> setQuota(QuotaSettings quota)
AsyncAdminsetQuota in interface AsyncAdminquota - the quota settingspublic CompletableFuture<List<QuotaSettings>> getQuota(QuotaFilter filter)
AsyncAdmingetQuota in interface AsyncAdminfilter - the quota settings filterpublic CompletableFuture<Void> addReplicationPeer(String peerId, ReplicationPeerConfig peerConfig, boolean enabled)
AsyncAdminaddReplicationPeer in interface AsyncAdminpeerId - a short name that identifies the peerpeerConfig - configuration for the replication slave clusterenabled - peer state, true if ENABLED and false if DISABLEDpublic CompletableFuture<Void> removeReplicationPeer(String peerId)
AsyncAdminremoveReplicationPeer in interface AsyncAdminpeerId - a short name that identifies the peerpublic CompletableFuture<Void> enableReplicationPeer(String peerId)
AsyncAdminenableReplicationPeer in interface AsyncAdminpeerId - a short name that identifies the peerpublic CompletableFuture<Void> disableReplicationPeer(String peerId)
AsyncAdmindisableReplicationPeer in interface AsyncAdminpeerId - a short name that identifies the peerpublic CompletableFuture<ReplicationPeerConfig> getReplicationPeerConfig(String peerId)
AsyncAdmingetReplicationPeerConfig in interface AsyncAdminpeerId - a short name that identifies the peerCompletableFuture.public CompletableFuture<Void> updateReplicationPeerConfig(String peerId, ReplicationPeerConfig peerConfig)
AsyncAdminupdateReplicationPeerConfig in interface AsyncAdminpeerId - a short name that identifies the peerpeerConfig - new config for the peerpublic CompletableFuture<Void> appendReplicationPeerTableCFs(String peerId, Map<TableName,List<String>> tableCfs)
AsyncAdminappendReplicationPeerTableCFs in interface AsyncAdminpeerId - a short that identifies the clustertableCfs - A map from tableName to column family namespublic CompletableFuture<Void> removeReplicationPeerTableCFs(String peerId, Map<TableName,List<String>> tableCfs)
AsyncAdminremoveReplicationPeerTableCFs in interface AsyncAdminpeerId - a short name that identifies the clustertableCfs - A map from tableName to column family namespublic CompletableFuture<List<ReplicationPeerDescription>> listReplicationPeers()
AsyncAdminlistReplicationPeers in interface AsyncAdminCompletableFuture.public CompletableFuture<List<ReplicationPeerDescription>> listReplicationPeers(Pattern pattern)
AsyncAdminlistReplicationPeers in interface AsyncAdminpattern - The compiled regular expression to match peer idCompletableFuture.public CompletableFuture<List<TableCFs>> listReplicatedTableCFs()
AsyncAdminlistReplicatedTableCFs in interface AsyncAdminCompletableFuture.public CompletableFuture<Void> enableTableReplication(TableName tableName)
AsyncAdminenableTableReplication in interface AsyncAdmintableName - name of the tablepublic CompletableFuture<Void> disableTableReplication(TableName tableName)
AsyncAdmindisableTableReplication in interface AsyncAdmintableName - name of the tablepublic CompletableFuture<Void> snapshot(SnapshotDescription snapshot)
AsyncAdminSnapshotCreationException
indicating the duplicate naming. Snapshot names follow the same naming constraints as tables in
HBase. See TableName.isLegalFullyQualifiedTableName(byte[]).
You should probably use AsyncAdmin.snapshot(String, org.apache.hadoop.hbase.TableName) unless you
are sure about the type of snapshot that you want to take.snapshot in interface AsyncAdminsnapshot - snapshot to takepublic CompletableFuture<Boolean> isSnapshotFinished(SnapshotDescription snapshot)
AsyncAdminUnknownSnapshotException.isSnapshotFinished in interface AsyncAdminsnapshot - description of the snapshot to checkpublic CompletableFuture<Void> restoreSnapshot(String snapshotName)
AsyncAdminrestoreSnapshot in interface AsyncAdminsnapshotName - name of the snapshot to restorepublic CompletableFuture<Void> restoreSnapshot(String snapshotName, boolean takeFailSafeSnapshot, boolean restoreAcl)
AsyncAdminrestoreSnapshot in interface AsyncAdminsnapshotName - name of the snapshot to restoretakeFailSafeSnapshot - true if the failsafe snapshot should be takenrestoreAcl - true to restore acl of snapshotpublic CompletableFuture<Void> cloneSnapshot(String snapshotName, TableName tableName, boolean restoreAcl, String customSFT)
AsyncAdmincloneSnapshot in interface AsyncAdminsnapshotName - name of the snapshot to be clonedtableName - name of the table where the snapshot will be restoredrestoreAcl - true to restore acl of snapshotcustomSFT - specify the StroreFileTracker used for the tablepublic CompletableFuture<List<SnapshotDescription>> listSnapshots()
AsyncAdminlistSnapshots in interface AsyncAdminCompletableFuturepublic CompletableFuture<List<SnapshotDescription>> listSnapshots(Pattern pattern)
AsyncAdminlistSnapshots in interface AsyncAdminpattern - The compiled regular expression to match againstCompletableFuturepublic CompletableFuture<List<SnapshotDescription>> listTableSnapshots(Pattern tableNamePattern)
AsyncAdminlistTableSnapshots in interface AsyncAdmintableNamePattern - The compiled table name regular expression to match againstCompletableFuturepublic CompletableFuture<List<SnapshotDescription>> listTableSnapshots(Pattern tableNamePattern, Pattern snapshotNamePattern)
AsyncAdminlistTableSnapshots in interface AsyncAdmintableNamePattern - The compiled table name regular expression to match againstsnapshotNamePattern - The compiled snapshot name regular expression to match againstCompletableFuturepublic CompletableFuture<Void> deleteSnapshot(String snapshotName)
AsyncAdmindeleteSnapshot in interface AsyncAdminsnapshotName - name of the snapshotpublic CompletableFuture<Void> deleteSnapshots()
AsyncAdmindeleteSnapshots in interface AsyncAdminpublic CompletableFuture<Void> deleteSnapshots(Pattern pattern)
AsyncAdmindeleteSnapshots in interface AsyncAdminpattern - pattern for names of the snapshot to matchpublic CompletableFuture<Void> deleteTableSnapshots(Pattern tableNamePattern)
AsyncAdmindeleteTableSnapshots in interface AsyncAdmintableNamePattern - The compiled table name regular expression to match againstpublic CompletableFuture<Void> deleteTableSnapshots(Pattern tableNamePattern, Pattern snapshotNamePattern)
AsyncAdmindeleteTableSnapshots in interface AsyncAdmintableNamePattern - The compiled table name regular expression to match againstsnapshotNamePattern - The compiled snapshot name regular expression to match againstpublic CompletableFuture<Void> execProcedure(String signature, String instance, Map<String,String> props)
AsyncAdminexecProcedure in interface AsyncAdminsignature - A distributed procedure is uniquely identified by its signature (default the
root ZK node name of the procedure).instance - The instance name of the procedure. For some procedures, this parameter is
optional.props - Property/Value pairs of properties passing to the procedurepublic CompletableFuture<byte[]> execProcedureWithReturn(String signature, String instance, Map<String,String> props)
AsyncAdminexecProcedureWithReturn in interface AsyncAdminsignature - A distributed procedure is uniquely identified by its signature (default the
root ZK node name of the procedure).instance - The instance name of the procedure. For some procedures, this parameter is
optional.props - Property/Value pairs of properties passing to the procedurepublic CompletableFuture<Boolean> isProcedureFinished(String signature, String instance, Map<String,String> props)
AsyncAdminisProcedureFinished in interface AsyncAdminsignature - The signature that uniquely identifies a procedureinstance - The instance name of the procedureprops - Property/Value pairs of properties passing to the procedureCompletableFuturepublic CompletableFuture<Boolean> abortProcedure(long procId, boolean mayInterruptIfRunning)
AsyncAdminabortProcedure in interface AsyncAdminprocId - ID of the procedure to abortmayInterruptIfRunning - if the proc completed at least one step, should it be aborted?CompletableFuturepublic CompletableFuture<String> getProcedures()
AsyncAdmingetProcedures in interface AsyncAdminCompletableFuturepublic CompletableFuture<String> getLocks()
AsyncAdmingetLocks in interface AsyncAdminCompletableFuturepublic CompletableFuture<Void> decommissionRegionServers(List<ServerName> servers, boolean offload)
AsyncAdmindecommissionRegionServers in interface AsyncAdminservers - The list of servers to decommission.offload - True to offload the regions from the decommissioned serverspublic CompletableFuture<List<ServerName>> listDecommissionedRegionServers()
AsyncAdminlistDecommissionedRegionServers in interface AsyncAdminCompletableFuturepublic CompletableFuture<Void> recommissionRegionServer(ServerName server, List<byte[]> encodedRegionNames)
AsyncAdminrecommissionRegionServer in interface AsyncAdminserver - The server to recommission.encodedRegionNames - Regions to load onto the server.public CompletableFuture<ClusterMetrics> getClusterMetrics()
AsyncAdminCompletableFuturegetClusterMetrics in interface AsyncAdminpublic CompletableFuture<ClusterMetrics> getClusterMetrics(EnumSet<ClusterMetrics.Option> options)
AsyncAdminCompletableFuturegetClusterMetrics in interface AsyncAdminpublic CompletableFuture<Void> shutdown()
AsyncAdminshutdown in interface AsyncAdminpublic CompletableFuture<Void> stopMaster()
AsyncAdminstopMaster in interface AsyncAdminpublic CompletableFuture<Void> stopRegionServer(ServerName serverName)
AsyncAdminstopRegionServer in interface AsyncAdminpublic CompletableFuture<Void> updateConfiguration(ServerName serverName)
AsyncAdminupdateConfiguration in interface AsyncAdminserverName - : The server whose config needs to be updated.public CompletableFuture<Void> updateConfiguration()
AsyncAdminupdateConfiguration in interface AsyncAdminpublic CompletableFuture<Void> rollWALWriter(ServerName serverName)
AsyncAdminWhen the returned CompletableFuture is done, it only means the rollWALWriter request was sent to the region server and may need some time to finish the rollWALWriter operation. As a side effect of this call, the named region server may schedule store flushes at the request of the wal.
rollWALWriter in interface AsyncAdminserverName - The servername of the region server.public CompletableFuture<Void> clearCompactionQueues(ServerName serverName, Set<String> queues)
AsyncAdminclearCompactionQueues in interface AsyncAdminserverName - The servername of the region server.queues - the set of queue namepublic CompletableFuture<List<SecurityCapability>> getSecurityCapabilities()
AsyncAdminCompletableFuture.getSecurityCapabilities in interface AsyncAdminpublic CompletableFuture<List<RegionMetrics>> getRegionMetrics(ServerName serverName)
AsyncAdminRegionMetrics of all regions hosted on a region server.getRegionMetrics in interface AsyncAdminRegionMetrics wrapped by CompletableFuturepublic CompletableFuture<List<RegionMetrics>> getRegionMetrics(ServerName serverName, TableName tableName)
AsyncAdminRegionMetrics of all regions hosted on a region server for a table.getRegionMetrics in interface AsyncAdminRegionMetrics wrapped by CompletableFuturepublic CompletableFuture<Boolean> isMasterInMaintenanceMode()
AsyncAdminisMasterInMaintenanceMode in interface AsyncAdminCompletableFuturepublic CompletableFuture<CompactionState> getCompactionState(TableName tableName, CompactType compactType)
AsyncAdmingetCompactionState in interface AsyncAdmintableName - table to examinecompactType - CompactTypeCompletableFuturepublic CompletableFuture<CompactionState> getCompactionStateForRegion(byte[] regionName)
AsyncAdmingetCompactionStateForRegion in interface AsyncAdminregionName - region to examineCompletableFuturepublic CompletableFuture<Optional<Long>> getLastMajorCompactionTimestamp(TableName tableName)
AsyncAdminThe timestamp of the oldest HFile resulting from a major compaction of that table, or not present if no such HFile could be found.
getLastMajorCompactionTimestamp in interface AsyncAdmintableName - table to examineCompletableFuturepublic CompletableFuture<Optional<Long>> getLastMajorCompactionTimestampForRegion(byte[] regionName)
AsyncAdminThe timestamp of the oldest HFile resulting from a major compaction of that region, or not present if no such HFile could be found.
getLastMajorCompactionTimestampForRegion in interface AsyncAdminregionName - region to examineCompletableFuturepublic CompletableFuture<Boolean> balancerSwitch(boolean on, boolean drainRITs)
AsyncAdmindrainRITs parameter only effects when will we complete the returned
CompletableFuture.balancerSwitch in interface AsyncAdminon - Set to true to enable, false to disable.drainRITs - If true, it waits until current balance() call, if outstanding,
to return.CompletableFuture.public CompletableFuture<BalanceResponse> balance(BalanceRequest request)
AsyncAdminBalanceRequest for more details.balance in interface AsyncAdminrequest - defines how the balancer should runBalanceResponse with details about the results of the invocation.public CompletableFuture<Boolean> isBalancerEnabled()
AsyncAdminisBalancerEnabled in interface AsyncAdminCompletableFuture.public CompletableFuture<Boolean> normalizerSwitch(boolean on)
AsyncAdminnormalizerSwitch in interface AsyncAdminon - whether normalizer should be on or offCompletableFuturepublic CompletableFuture<Boolean> isNormalizerEnabled()
AsyncAdminisNormalizerEnabled in interface AsyncAdminCompletableFuturepublic CompletableFuture<Boolean> normalize(NormalizeTableFilterParams ntfp)
AsyncAdminnormalize in interface AsyncAdminntfp - limit to tables matching the specified filter.CompletableFuturepublic CompletableFuture<Boolean> cleanerChoreSwitch(boolean enabled)
AsyncAdminCompletableFuturecleanerChoreSwitch in interface AsyncAdminpublic CompletableFuture<Boolean> isCleanerChoreEnabled()
AsyncAdminisCleanerChoreEnabled in interface AsyncAdminCompletableFuturepublic CompletableFuture<Boolean> runCleanerChore()
AsyncAdminrunCleanerChore in interface AsyncAdminCompletableFuturepublic CompletableFuture<Boolean> catalogJanitorSwitch(boolean enabled)
AsyncAdminCompletableFuturecatalogJanitorSwitch in interface AsyncAdminpublic CompletableFuture<Boolean> isCatalogJanitorEnabled()
AsyncAdminisCatalogJanitorEnabled in interface AsyncAdminCompletableFuturepublic CompletableFuture<Integer> runCatalogJanitor()
AsyncAdminrunCatalogJanitor in interface AsyncAdminCompletableFuturepublic <S,R> CompletableFuture<R> coprocessorService(Function<com.google.protobuf.RpcChannel,S> stubMaker, ServiceCaller<S,R> callable)
AsyncAdmin
The stubMaker is just a delegation to the newStub call. Usually it is only a
one line lambda expression, like:
channel -> xxxService.newStub(channel)
coprocessorService in interface AsyncAdminS - the type of the asynchronous stubR - the type of the return valuestubMaker - a delegation to the actual newStub call.callable - a delegation to the actual protobuf rpc call. See the comment of
ServiceCaller for more details.CompletableFuture.ServiceCallerpublic <S,R> CompletableFuture<R> coprocessorService(Function<com.google.protobuf.RpcChannel,S> stubMaker, ServiceCaller<S,R> callable, ServerName serverName)
AsyncAdmin
The stubMaker is just a delegation to the newStub call. Usually it is only a
one line lambda expression, like:
channel -> xxxService.newStub(channel)
coprocessorService in interface AsyncAdminS - the type of the asynchronous stubR - the type of the return valuestubMaker - a delegation to the actual newStub call.callable - a delegation to the actual protobuf rpc call. See the comment of
ServiceCaller for more details.serverName - the given region serverCompletableFuture.ServiceCallerpublic CompletableFuture<List<ServerName>> listDeadServers()
AsyncAdminlistDeadServers in interface AsyncAdminpublic CompletableFuture<List<ServerName>> listUnknownServers()
AsyncAdminlistUnknownServers in interface AsyncAdminpublic CompletableFuture<List<ServerName>> clearDeadServers(List<ServerName> servers)
AsyncAdminclearDeadServers in interface AsyncAdminservers - list of dead region servers.CompletableFuture.public CompletableFuture<CacheEvictionStats> clearBlockCache(TableName tableName)
AsyncAdminclearBlockCache in interface AsyncAdmintableName - table to clear block cacheCompletableFuture.public CompletableFuture<Void> cloneTableSchema(TableName tableName, TableName newTableName, boolean preserveSplits)
AsyncAdmincloneTableSchema in interface AsyncAdmintableName - name of the table to be clonednewTableName - name of the new table where the table will be createdpreserveSplits - True if the splits should be preservedpublic CompletableFuture<Map<ServerName,Boolean>> compactionSwitch(boolean switchState, List<String> serverNamesList)
AsyncAdmincompactionSwitch in interface AsyncAdminswitchState - Set to true to enable, false to disable.serverNamesList - list of region servers.public CompletableFuture<Boolean> switchRpcThrottle(boolean enable)
AsyncAdminswitchRpcThrottle in interface AsyncAdminenable - Set to true to enable, false to disable.public CompletableFuture<Boolean> isRpcThrottleEnabled()
AsyncAdminisRpcThrottleEnabled in interface AsyncAdminpublic CompletableFuture<Boolean> exceedThrottleQuotaSwitch(boolean enable)
AsyncAdminexceedThrottleQuotaSwitch in interface AsyncAdminenable - Set to true to enable, false to disable.public CompletableFuture<Map<TableName,Long>> getSpaceQuotaTableSizes()
AsyncAdmingetSpaceQuotaTableSizes in interface AsyncAdminpublic CompletableFuture<Map<TableName,SpaceQuotaSnapshot>> getRegionServerSpaceQuotaSnapshots(ServerName serverName)
AsyncAdminSpaceQuotaSnapshotViews observed by a RegionServer.getRegionServerSpaceQuotaSnapshots in interface AsyncAdminpublic CompletableFuture<SpaceQuotaSnapshot> getCurrentSpaceQuotaSnapshot(String namespace)
AsyncAdminnamespace or null if the Master has
no quota information on that namespace.getCurrentSpaceQuotaSnapshot in interface AsyncAdminpublic CompletableFuture<SpaceQuotaSnapshot> getCurrentSpaceQuotaSnapshot(TableName tableName)
AsyncAdmintableName or null if the Master has
no quota information on that table.getCurrentSpaceQuotaSnapshot in interface AsyncAdminpublic CompletableFuture<Void> grant(UserPermission userPermission, boolean mergeExistingPermissions)
AsyncAdmingrant in interface AsyncAdminuserPermission - user name and the specific permissionmergeExistingPermissions - If set to false, later granted permissions will override
previous granted permissions. otherwise, it'll merge with
previous granted permissions.public CompletableFuture<Void> revoke(UserPermission userPermission)
AsyncAdminrevoke in interface AsyncAdminuserPermission - user name and the specific permissionpublic CompletableFuture<List<UserPermission>> getUserPermissions(GetUserPermissionsRequest getUserPermissionsRequest)
AsyncAdmingetUserPermissions in interface AsyncAdmingetUserPermissionsRequest - A request contains which user, global, namespace or table
permissions neededpublic CompletableFuture<List<Boolean>> hasUserPermissions(String userName, List<Permission> permissions)
AsyncAdminhasUserPermissions in interface AsyncAdminuserName - the user namepermissions - the specific permission listpublic CompletableFuture<Boolean> snapshotCleanupSwitch(boolean on, boolean sync)
AsyncAdminsync parameter only effects when will we complete the returned
CompletableFuture.snapshotCleanupSwitch in interface AsyncAdminon - Set to true to enable, false to disable.sync - If true, it waits until current snapshot cleanup is completed, if
outstanding.CompletableFuture.public CompletableFuture<Boolean> isSnapshotCleanupEnabled()
AsyncAdminisSnapshotCleanupEnabled in interface AsyncAdminCompletableFuture.public CompletableFuture<List<Boolean>> clearSlowLogResponses(Set<ServerName> serverNames)
AsyncAdminclearSlowLogResponses in interface AsyncAdminserverNames - Set of Server names to clean slowlog responses fromCompletableFuturepublic CompletableFuture<List<LogEntry>> getLogEntries(Set<ServerName> serverNames, String logType, ServerType serverType, int limit, Map<String,Object> filterParams)
AsyncAdmingetLogEntries in interface AsyncAdminserverNames - servers to retrieve records from, useful in case of records maintained by
RegionServer as we can select specific server. In case of
servertype=MASTER, logs will only come from the currently active master.logType - string representing type of log recordsserverType - enum for server type: HMaster or RegionServerlimit - put a limit to list of records that server should send in responsefilterParams - additional filter paramspublic CompletableFuture<Void> flushMasterStore()
AsyncAdminflushMasterStore in interface AsyncAdminCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.