@InterfaceAudience.Private public class AsyncHBaseAdmin extends Object implements AsyncAdmin
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Boolean> |
abortProcedure(long procId,
boolean mayInterruptIfRunning)
abort a procedure
|
CompletableFuture<Void> |
addColumnFamily(TableName tableName,
ColumnFamilyDescriptor columnFamily)
Add a column family to an existing table.
|
CompletableFuture<Void> |
addReplicationPeer(String peerId,
ReplicationPeerConfig peerConfig)
Add a new replication peer for replicating data to slave cluster
|
CompletableFuture<Void> |
appendReplicationPeerTableCFs(String peerId,
Map<TableName,? extends Collection<String>> tableCfs)
Append the replicable table-cf config of the specified peer
|
CompletableFuture<Void> |
assign(byte[] regionName) |
CompletableFuture<Boolean> |
balance(boolean forcible)
Invoke the balancer.
|
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<Void> |
cloneSnapshot(String snapshotName,
TableName tableName)
Create a new table by cloning the snapshot content.
|
CompletableFuture<Void> |
compact(TableName tableName,
Optional<byte[]> columnFamily)
Compact a column family within a table.
|
CompletableFuture<Void> |
compactRegion(byte[] regionName,
Optional<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,
RawAsyncTable.CoprocessorCallable<S,R> callable)
Execute the given coprocessor call on the master.
|
<S,R> CompletableFuture<R> |
coprocessorService(Function<com.google.protobuf.RpcChannel,S> stubMaker,
RawAsyncTable.CoprocessorCallable<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,
byte[] startKey,
byte[] endKey,
int numRegions)
Creates a new table with the specified number of regions.
|
CompletableFuture<Void> |
createTable(TableDescriptor desc,
Optional<byte[][]> splitKeys)
Creates a new table with an initial set of empty regions defined by the specified split keys.
|
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> |
deleteTable(TableName tableName)
Deletes a table.
|
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> |
enableReplicationPeer(String peerId)
Restart the replication stream to the specified peer
|
CompletableFuture<Void> |
enableTable(TableName tableName)
Enable a table.
|
CompletableFuture<Void> |
execProcedure(String signature,
String instance,
Map<String,String> props)
Execute a distributed procedure on a cluster.
|
CompletableFuture<byte[]> |
execProcedureWithRet(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> |
flushRegion(byte[] regionName)
Flush an individual region.
|
CompletableFuture<ClusterStatus> |
getClusterStatus() |
CompletableFuture<ClusterStatus> |
getClusterStatus(EnumSet<ClusterStatus.Option> options) |
CompletableFuture<CompactionState> |
getCompactionState(TableName tableName)
Get the current compaction state of a table.
|
CompletableFuture<CompactionState> |
getCompactionStateForRegion(byte[] regionName)
Get the current compaction state of region.
|
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<NamespaceDescriptor> |
getNamespaceDescriptor(String name)
Get a namespace descriptor by name
|
CompletableFuture<List<RegionInfo>> |
getOnlineRegions(ServerName serverName)
Get all the online regions on a region server.
|
CompletableFuture<String> |
getProcedures()
List procedures
|
CompletableFuture<List<QuotaSettings>> |
getQuota(QuotaFilter filter)
List the quotas based on the filter.
|
CompletableFuture<List<RegionLoad>> |
getRegionLoads(ServerName serverName,
Optional<TableName> tableName)
Get a list of
RegionLoad of all regions hosted on a region seerver for a table. |
CompletableFuture<ReplicationPeerConfig> |
getReplicationPeerConfig(String peerId)
Returns the configured ReplicationPeerConfig for the specified peer
|
CompletableFuture<List<SecurityCapability>> |
getSecurityCapabilities() |
CompletableFuture<TableDescriptor> |
getTableDescriptor(TableName tableName)
Method for getting the tableDescriptor
|
CompletableFuture<List<RegionInfo>> |
getTableRegions(TableName tableName)
Get the regions of a given table.
|
CompletableFuture<Boolean> |
isBalancerOn()
Query the current state of the balancer.
|
CompletableFuture<Boolean> |
isCatalogJanitorOn()
Query on the catalog janitor state.
|
CompletableFuture<Boolean> |
isCleanerChoreOn()
Query the current state of the cleaner chore.
|
CompletableFuture<Boolean> |
isMasterInMaintenanceMode()
Check whether master is in maintenance mode
|
CompletableFuture<Boolean> |
isMergeOn()
Query the current state of the Merge switch.
|
CompletableFuture<Boolean> |
isNormalizerOn()
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> |
isSnapshotFinished(SnapshotDescription snapshot)
Check the current state of the passed snapshot.
|
CompletableFuture<Boolean> |
isSplitOn()
Query the current state of the Split switch.
|
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) |
CompletableFuture<Boolean> |
isTableEnabled(TableName tableName) |
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<TableCFs>> |
listReplicatedTableCFs()
Find all table and column families that are replicated from this cluster
|
CompletableFuture<List<ReplicationPeerDescription>> |
listReplicationPeers(Optional<Pattern> pattern)
Return a list of replication peers.
|
CompletableFuture<List<SnapshotDescription>> |
listSnapshots(Optional<Pattern> pattern)
List all the completed snapshots matching the given pattern.
|
CompletableFuture<List<TableName>> |
listTableNames(Optional<Pattern> pattern,
boolean includeSysTables)
List all of the names of userspace tables.
|
CompletableFuture<List<TableDescriptor>> |
listTables(Optional<Pattern> pattern,
boolean includeSysTables)
List all the tables matching the given 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<Void> |
majorCompact(TableName tableName,
Optional<byte[]> columnFamily)
Major compact a column family within a table.
|
CompletableFuture<Void> |
majorCompactRegion(byte[] regionName,
Optional<byte[]> columnFamily)
Major compact a column family within region.
|
CompletableFuture<Void> |
majorCompactRegionServer(ServerName serverName)
Compact all regions on the region server.
|
CompletableFuture<Void> |
mergeRegions(byte[] nameOfRegionA,
byte[] nameOfRegionB,
boolean forcible)
Merge two regions.
|
CompletableFuture<Void> |
modifyColumnFamily(TableName tableName,
ColumnFamilyDescriptor columnFamily)
Modify an existing column family on a table.
|
CompletableFuture<Void> |
modifyNamespace(NamespaceDescriptor descriptor)
Modify an existing namespace.
|
CompletableFuture<Void> |
move(byte[] regionName,
Optional<ServerName> destServerName)
Move the region
r to dest. |
CompletableFuture<Boolean> |
normalize()
Invoke region normalizer.
|
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,? extends Collection<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)
Restore the specified snapshot on the original table.
|
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<Boolean> |
setBalancerOn(boolean on)
Turn the load balancer on or off.
|
CompletableFuture<Boolean> |
setCatalogJanitorOn(boolean enabled)
Turn the catalog janitor on/off.
|
CompletableFuture<Boolean> |
setCleanerChoreOn(boolean enabled)
Turn the cleaner chore on/off.
|
CompletableFuture<Boolean> |
setMergeOn(boolean on)
Turn the Merge switch on or off.
|
CompletableFuture<Boolean> |
setNormalizerOn(boolean on)
Set region normalizer on/off.
|
CompletableFuture<Void> |
setQuota(QuotaSettings quota)
Apply the new quota settings.
|
CompletableFuture<Boolean> |
setSplitOn(boolean on)
Turn the Split switch on or off.
|
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<Void> |
split(TableName tableName)
Split a table.
|
CompletableFuture<Void> |
split(TableName tableName,
byte[] splitPoint)
Split a table.
|
CompletableFuture<Void> |
splitRegion(byte[] regionName,
Optional<byte[]> splitPoint)
Split an individual region.
|
CompletableFuture<Void> |
stopMaster()
Shuts down the current HBase master only.
|
CompletableFuture<Void> |
stopRegionServer(ServerName serverName)
Stop the designated regionserver.
|
CompletableFuture<Boolean> |
tableExists(TableName tableName) |
CompletableFuture<Void> |
truncateTable(TableName tableName,
boolean preserveSplits)
Truncate a table.
|
CompletableFuture<Void> |
unassign(byte[] regionName,
boolean forcible)
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbalance, compact, compactRegion, createTable, deleteSnapshots, getBackupMasters, getMaster, getMasterInfoPort, getRegionLoads, getRegionServers, isTableAvailable, listReplicationPeers, listSnapshots, listTableNames, listTables, majorCompact, majorCompactRegion, snapshot, snapshot, splitRegionpublic CompletableFuture<Boolean> tableExists(TableName tableName)
tableExists in interface AsyncAdmintableName - Table to check.CompletableFuture.public CompletableFuture<List<TableDescriptor>> listTables(Optional<Pattern> pattern, boolean includeSysTables)
AsyncAdminlistTables in interface AsyncAdminpattern - The compiled regular expression to match againstincludeSysTables - False to match only against userspace tablesCompletableFuture.public CompletableFuture<List<TableName>> listTableNames(Optional<Pattern> pattern, boolean includeSysTables)
AsyncAdminlistTableNames in interface AsyncAdminpattern - The regular expression to match againstincludeSysTables - False to match only against userspace tablesCompletableFuture.public CompletableFuture<TableDescriptor> getTableDescriptor(TableName tableName)
AsyncAdmingetTableDescriptor in interface AsyncAdmintableName - as a TableNameCompletableFuture.public 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, Optional<byte[][]> splitKeys)
AsyncAdmincreateTable in interface AsyncAdmindesc - table descriptor for tablesplitKeys - array of split keys for the initial regions of the tablepublic 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)
isTableEnabled in interface AsyncAdmintableName - name of table to checkCompletableFuture.public CompletableFuture<Boolean> isTableDisabled(TableName tableName)
isTableDisabled 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> 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<NamespaceDescriptor>> listNamespaceDescriptors()
AsyncAdminlistNamespaceDescriptors in interface AsyncAdminCompletableFuture.public CompletableFuture<List<RegionInfo>> getOnlineRegions(ServerName serverName)
AsyncAdmingetOnlineRegions in interface AsyncAdminpublic CompletableFuture<List<RegionInfo>> getTableRegions(TableName tableName)
AsyncAdmingetTableRegions in interface AsyncAdminpublic CompletableFuture<Void> flush(TableName tableName)
AsyncAdminflush in interface AsyncAdmintableName - table to flushpublic CompletableFuture<Void> flushRegion(byte[] regionName)
AsyncAdminflushRegion in interface AsyncAdminregionName - region to flushpublic CompletableFuture<Void> compact(TableName tableName, Optional<byte[]> columnFamily)
AsyncAdmincompact in interface AsyncAdmintableName - table to compactcolumnFamily - column family within a table. If not present, compact the table's all
column families.public CompletableFuture<Void> compactRegion(byte[] regionName, Optional<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, Optional<byte[]> columnFamily)
AsyncAdminmajorCompact in interface AsyncAdmintableName - table to major compactcolumnFamily - column family within a table. If not present, major compact the table's all
column families.public CompletableFuture<Void> majorCompactRegion(byte[] regionName, Optional<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> setMergeOn(boolean on)
AsyncAdminsetMergeOn in interface AsyncAdminCompletableFuturepublic CompletableFuture<Boolean> isMergeOn()
AsyncAdminisMergeOn in interface AsyncAdminCompletableFuturepublic CompletableFuture<Boolean> setSplitOn(boolean on)
AsyncAdminsetSplitOn in interface AsyncAdminCompletableFuturepublic CompletableFuture<Boolean> isSplitOn()
AsyncAdminisSplitOn in interface AsyncAdminCompletableFuturepublic CompletableFuture<Void> mergeRegions(byte[] nameOfRegionA, byte[] nameOfRegionB, boolean forcible)
AsyncAdminmergeRegions in interface AsyncAdminnameOfRegionA - encoded or full name of region anameOfRegionB - encoded or full name of region bforcible - 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, Optional<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)
assign in interface AsyncAdminregionName - Encoded or full name of region to assign.public CompletableFuture<Void> unassign(byte[] regionName, boolean forcible)
AsyncAdminAsyncAdmin.move(byte[], Optional) if you want to control the region movement.unassign in interface AsyncAdminregionName - Encoded or full name of region to unassign. Will clear any existing
RegionPlan if one found.forcible - If true, force unassign (Will remove region from regions-in-transition too if
present. If results in double assignment use hbck -fix to resolve. To be used by
experts).public CompletableFuture<Void> offline(byte[] regionName)
AsyncAdminoffline in interface AsyncAdminregionName - Encoded or full name of region to offlinepublic CompletableFuture<Void> move(byte[] regionName, Optional<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)
AsyncAdminaddReplicationPeer in interface AsyncAdminpeerId - a short name that identifies the peerpeerConfig - configuration for the replication slave clusterpublic 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,? extends Collection<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,? extends Collection<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(Optional<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> 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)
AsyncAdminrestoreSnapshot in interface AsyncAdminsnapshotName - name of the snapshot to restoretakeFailSafeSnapshot - true if the failsafe snapshot should be takenpublic CompletableFuture<Void> cloneSnapshot(String snapshotName, TableName tableName)
AsyncAdmincloneSnapshot in interface AsyncAdminsnapshotName - name of the snapshot to be clonedtableName - name of the table where the snapshot will be restoredpublic CompletableFuture<List<SnapshotDescription>> listSnapshots(Optional<Pattern> pattern)
AsyncAdminlistSnapshots in interface AsyncAdminpattern - The compiled 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> 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[]> execProcedureWithRet(String signature, String instance, Map<String,String> props)
AsyncAdminexecProcedureWithRet 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<ClusterStatus> getClusterStatus()
getClusterStatus in interface AsyncAdminCompletableFuturepublic CompletableFuture<ClusterStatus> getClusterStatus(EnumSet<ClusterStatus.Option> options)
getClusterStatus in interface AsyncAdminCompletableFuturepublic 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 AsyncAdminqueues - the set of queue namepublic CompletableFuture<List<SecurityCapability>> getSecurityCapabilities()
getSecurityCapabilities in interface AsyncAdminCompletableFuture.public CompletableFuture<List<RegionLoad>> getRegionLoads(ServerName serverName, Optional<TableName> tableName)
AsyncAdminRegionLoad of all regions hosted on a region seerver for a table.getRegionLoads in interface AsyncAdminRegionLoad wrapped by CompletableFuturepublic CompletableFuture<Boolean> isMasterInMaintenanceMode()
AsyncAdminisMasterInMaintenanceMode in interface AsyncAdminCompletableFuturepublic CompletableFuture<CompactionState> getCompactionState(TableName tableName)
AsyncAdmingetCompactionState in interface AsyncAdmintableName - table to examineCompletableFuturepublic 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> setBalancerOn(boolean on)
AsyncAdminsetBalancerOn in interface AsyncAdminCompletableFuture.public CompletableFuture<Boolean> balance(boolean forcible)
AsyncAdminbalance in interface AsyncAdminforcible - whether we should force balance even if there is region in transition.CompletableFuture.public CompletableFuture<Boolean> isBalancerOn()
AsyncAdminisBalancerOn in interface AsyncAdminCompletableFuture.public CompletableFuture<Boolean> setNormalizerOn(boolean on)
AsyncAdminsetNormalizerOn in interface AsyncAdminon - whether normalizer should be on or offCompletableFuturepublic CompletableFuture<Boolean> isNormalizerOn()
AsyncAdminisNormalizerOn in interface AsyncAdminCompletableFuturepublic CompletableFuture<Boolean> normalize()
AsyncAdminnormalize in interface AsyncAdminCompletableFuturepublic CompletableFuture<Boolean> setCleanerChoreOn(boolean enabled)
AsyncAdminsetCleanerChoreOn in interface AsyncAdminCompletableFuturepublic CompletableFuture<Boolean> isCleanerChoreOn()
AsyncAdminisCleanerChoreOn in interface AsyncAdminCompletableFuturepublic CompletableFuture<Boolean> runCleanerChore()
AsyncAdminrunCleanerChore in interface AsyncAdminCompletableFuturepublic CompletableFuture<Boolean> setCatalogJanitorOn(boolean enabled)
AsyncAdminsetCatalogJanitorOn in interface AsyncAdminCompletableFuturepublic CompletableFuture<Boolean> isCatalogJanitorOn()
AsyncAdminisCatalogJanitorOn in interface AsyncAdminCompletableFuturepublic CompletableFuture<Integer> runCatalogJanitor()
AsyncAdminrunCatalogJanitor in interface AsyncAdminCompletableFuturepublic <S,R> CompletableFuture<R> coprocessorService(Function<com.google.protobuf.RpcChannel,S> stubMaker, RawAsyncTable.CoprocessorCallable<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
RawAsyncTable.CoprocessorCallable for more details.CompletableFuture.RawAsyncTable.CoprocessorCallablepublic <S,R> CompletableFuture<R> coprocessorService(Function<com.google.protobuf.RpcChannel,S> stubMaker, RawAsyncTable.CoprocessorCallable<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
RawAsyncTable.CoprocessorCallable for more details.serverName - the given region serverCompletableFuture.RawAsyncTable.CoprocessorCallablepublic CompletableFuture<List<ServerName>> listDeadServers()
AsyncAdminlistDeadServers in interface AsyncAdminCompletableFuture.public CompletableFuture<List<ServerName>> clearDeadServers(List<ServerName> servers)
AsyncAdminclearDeadServers in interface AsyncAdminservers - list of dead region servers.CompletableFuture.Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.