@InterfaceAudience.Private @InterfaceStability.Evolving public class AsyncHBaseAdmin extends Object implements AsyncAdmin
| Modifier and Type | Field and Description |
|---|---|
static String |
FLUSH_TABLE_PROCEDURE_SIGNATURE |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Boolean> |
abortProcedure(long procId,
boolean mayInterruptIfRunning)
abort a procedure
|
CompletableFuture<Void> |
addColumnFamily(TableName tableName,
HColumnDescriptor 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 id,
Map<TableName,? extends Collection<String>> tableCfs)
Append the replicable table-cf config of the specified peer
|
CompletableFuture<Void> |
assign(byte[] regionName) |
CompletableFuture<Boolean> |
balancer()
Invoke the balancer.
|
CompletableFuture<Boolean> |
balancer(boolean force)
Invoke the balancer.
|
CompletableFuture<Void> |
cloneSnapshot(String snapshotName,
TableName tableName)
Create a new table by cloning the snapshot content.
|
CompletableFuture<Void> |
closeRegion(byte[] regionName,
String serverName)
Close a region.
|
CompletableFuture<Void> |
closeRegion(ServerName sn,
HRegionInfo hri)
Close a region.
|
CompletableFuture<Void> |
closeRegion(String regionname,
String serverName)
Close a region.
|
CompletableFuture<Boolean> |
closeRegionWithEncodedRegionName(String encodedRegionName,
String serverName)
For expert-admins.
|
CompletableFuture<Void> |
compact(TableName tableName)
Compact a table.
|
CompletableFuture<Void> |
compact(TableName tableName,
byte[] columnFamily)
Compact a column family within a table.
|
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 sn)
Compact all regions on the 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> |
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(Pattern snapshotNamePattern)
Delete existing snapshots whose names match the pattern passed.
|
CompletableFuture<Void> |
deleteSnapshots(String regex)
Delete existing snapshots whose names match the pattern passed.
|
CompletableFuture<Void> |
deleteTable(TableName tableName)
Deletes a table.
|
CompletableFuture<TableDescriptor[]> |
deleteTables(Pattern pattern)
Delete tables matching the passed in pattern and wait on completion.
|
CompletableFuture<TableDescriptor[]> |
deleteTables(String regex)
Deletes tables matching the passed in pattern and wait on completion.
|
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> |
deleteTableSnapshots(String tableNameRegex,
String snapshotNameRegex)
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<TableDescriptor[]> |
disableTables(Pattern pattern)
Disable tables matching the passed in pattern.
|
CompletableFuture<TableDescriptor[]> |
disableTables(String regex)
Disable tables matching the passed in pattern.
|
CompletableFuture<Void> |
enableReplicationPeer(String peerId)
Restart the replication stream to the specified peer
|
CompletableFuture<Void> |
enableTable(TableName tableName)
Enable a table.
|
CompletableFuture<TableDescriptor[]> |
enableTables(Pattern pattern)
Enable tables matching the passed in pattern.
|
CompletableFuture<TableDescriptor[]> |
enableTables(String regex)
Enable tables matching the passed in pattern.
|
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<Pair<Integer,Integer>> |
getAlterStatus(TableName tableName)
Get the status of alter command - indicates how many regions have received the updated schema
Asynchronous operation.
|
org.apache.hadoop.hbase.client.AsyncConnectionImpl |
getConnection() |
CompletableFuture<NamespaceDescriptor> |
getNamespaceDescriptor(String name)
Get a namespace descriptor by name
|
CompletableFuture<List<HRegionInfo>> |
getOnlineRegions(ServerName sn)
Get all the online regions on a region server.
|
CompletableFuture<List<QuotaSettings>> |
getQuota(QuotaFilter filter)
List the quotas based on the filter.
|
CompletableFuture<ReplicationPeerConfig> |
getReplicationPeerConfig(String peerId)
Returns the configured ReplicationPeerConfig for the specified peer
|
CompletableFuture<TableDescriptor> |
getTableDescriptor(TableName tableName)
Method for getting the tableDescriptor
|
CompletableFuture<Boolean> |
isBalancerEnabled()
Query the current state of the balancer.
|
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> |
isTableAvailable(TableName tableName) |
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<NamespaceDescriptor[]> |
listNamespaceDescriptors()
List available namespace descriptors
|
CompletableFuture<ProcedureInfo[]> |
listProcedures()
List procedures
|
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<ReplicationPeerDescription>> |
listReplicationPeers(String regex)
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<SnapshotDescription>> |
listSnapshots(String regex)
List all the completed snapshots matching the given regular expression.
|
CompletableFuture<TableName[]> |
listTableNames()
List all of the names of userspace tables.
|
CompletableFuture<TableName[]> |
listTableNames(Pattern pattern,
boolean includeSysTables)
List all of the names of userspace tables.
|
CompletableFuture<TableName[]> |
listTableNames(String regex,
boolean includeSysTables)
List all of the names of userspace tables.
|
CompletableFuture<TableDescriptor[]> |
listTables()
List all the userspace tables.
|
CompletableFuture<TableDescriptor[]> |
listTables(Pattern pattern,
boolean includeSysTables)
List all the tables matching the given pattern.
|
CompletableFuture<TableDescriptor[]> |
listTables(String regex,
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<List<SnapshotDescription>> |
listTableSnapshots(String tableNameRegex,
String snapshotNameRegex)
List all the completed snapshots matching the given table name regular expression and snapshot
name regular expression.
|
CompletableFuture<Void> |
majorCompact(TableName tableName)
Major compact a table.
|
CompletableFuture<Void> |
majorCompact(TableName tableName,
byte[] columnFamily)
Major compact a column family within a table.
|
CompletableFuture<Void> |
majorCompactRegion(byte[] regionName)
Major compact a table or an individual region.
|
CompletableFuture<Void> |
majorCompactRegion(byte[] regionName,
byte[] columnFamily)
Major compact a column family within region.
|
CompletableFuture<Void> |
majorCompactRegionServer(ServerName sn)
Compact all regions on the region server.
|
CompletableFuture<Void> |
mergeRegions(byte[] nameOfRegionA,
byte[] nameOfRegionB,
boolean forcible)
Merge two regions.
|
CompletableFuture<Void> |
modifyColumnFamily(TableName tableName,
HColumnDescriptor columnFamily)
Modify an existing column family on a table.
|
CompletableFuture<Void> |
modifyNamespace(NamespaceDescriptor descriptor)
Modify an existing namespace.
|
CompletableFuture<Void> |
move(byte[] regionName,
byte[] destServerName)
Move the region
r to dest. |
CompletableFuture<Void> |
offline(byte[] regionName)
Offline specified region from master's in-memory state.
|
CompletableFuture<Void> |
removeReplicationPeer(String peerId)
Remove a peer and stop the replication
|
CompletableFuture<Void> |
removeReplicationPeerTableCFs(String id,
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<Boolean> |
setBalancerRunning(boolean on)
Turn the load balancer on or off.
|
CompletableFuture<Void> |
setQuota(QuotaSettings quota)
Apply the new quota settings.
|
CompletableFuture<Void> |
snapshot(SnapshotDescription snapshotDesc)
Take a snapshot and wait for the server to complete that snapshot asynchronously.
|
CompletableFuture<Void> |
snapshot(String snapshotName,
TableName tableName)
Take a snapshot for the given table.
|
CompletableFuture<Void> |
snapshot(String snapshotName,
TableName tableName,
SnapshotType type)
Create typed snapshot of the table.
|
CompletableFuture<Void> |
split(ServerName sn,
HRegionInfo hri,
byte[] splitPoint) |
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> |
tableExists(TableName tableName) |
CompletableFuture<Void> |
truncateTable(TableName tableName,
boolean preserveSplits)
Truncate a table.
|
CompletableFuture<Void> |
unassign(byte[] regionName,
boolean force)
Unassign a region from current hosting regionserver.
|
CompletableFuture<Void> |
updateReplicationPeerConfig(String peerId,
ReplicationPeerConfig peerConfig)
Update the peerConfig for the specified peer
|
public static final String FLUSH_TABLE_PROCEDURE_SIGNATURE
public org.apache.hadoop.hbase.client.AsyncConnectionImpl getConnection()
getConnection in interface AsyncAdminpublic CompletableFuture<Boolean> tableExists(TableName tableName)
tableExists in interface AsyncAdmintableName - Table to check.CompletableFuture.public CompletableFuture<TableDescriptor[]> listTables()
AsyncAdminlistTables in interface AsyncAdminCompletableFuture.AsyncAdmin.listTables(Pattern, boolean)public CompletableFuture<TableDescriptor[]> listTables(String regex, boolean includeSysTables)
AsyncAdminlistTables in interface AsyncAdminregex - The regular expression to match againstincludeSysTables - False to match only against userspace tablesCompletableFuture.AsyncAdmin.listTables(Pattern, boolean)public CompletableFuture<TableDescriptor[]> listTables(Pattern pattern, boolean includeSysTables)
AsyncAdminlistTables in interface AsyncAdminpattern - The compiled regular expression to match againstincludeSysTables - False to match only against userspace tablesCompletableFuture.public CompletableFuture<TableName[]> listTableNames()
AsyncAdminlistTableNames in interface AsyncAdminCompletableFuture.AsyncAdmin.listTableNames(Pattern, boolean)public CompletableFuture<TableName[]> listTableNames(String regex, boolean includeSysTables)
AsyncAdminlistTableNames in interface AsyncAdminregex - The regular expression to match againstincludeSysTables - False to match only against userspace tablesCompletableFuture.AsyncAdmin.listTableNames(Pattern, boolean)public CompletableFuture<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<TableDescriptor> getTableDescriptor(TableName tableName)
AsyncAdmingetTableDescriptor 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> deleteTable(TableName tableName)
AsyncAdmindeleteTable in interface AsyncAdmintableName - name of table to deletepublic CompletableFuture<TableDescriptor[]> deleteTables(String regex)
AsyncAdminAsyncAdmin.listTables(String, boolean) and
AsyncAdmin.deleteTable(org.apache.hadoop.hbase.TableName)deleteTables in interface AsyncAdminregex - The regular expression to match table names againstCompletableFuture. The return HTDs are read-only.public CompletableFuture<TableDescriptor[]> deleteTables(Pattern pattern)
AsyncAdminAsyncAdmin.listTables(Pattern, boolean) and
AsyncAdmin.deleteTable(org.apache.hadoop.hbase.TableName)deleteTables in interface AsyncAdminpattern - The pattern to match table names againstCompletableFuture. The return HTDs are read-only.public 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<TableDescriptor[]> enableTables(String regex)
AsyncAdminAsyncAdmin.listTables(Pattern, boolean) and
AsyncAdmin.enableTable(TableName)enableTables in interface AsyncAdminregex - The regular expression to match table names againstCompletableFuture. The return HTDs are read-only.public CompletableFuture<TableDescriptor[]> enableTables(Pattern pattern)
AsyncAdminAsyncAdmin.listTables(Pattern, boolean) and
AsyncAdmin.enableTable(TableName)enableTables in interface AsyncAdminpattern - The pattern to match table names againstCompletableFuture. The return HTDs are read-only.public CompletableFuture<Void> disableTable(TableName tableName)
AsyncAdmindisableTable in interface AsyncAdminpublic CompletableFuture<TableDescriptor[]> disableTables(String regex)
AsyncAdminAsyncAdmin.listTables(Pattern, boolean) and
AsyncAdmin.disableTable(TableName)disableTables in interface AsyncAdminregex - The regular expression to match table names againstCompletableFuture. The return HTDs are read-only.public CompletableFuture<TableDescriptor[]> disableTables(Pattern pattern)
AsyncAdminAsyncAdmin.listTables(Pattern, boolean) and
AsyncAdmin.disableTable(TableName)disableTables in interface AsyncAdminpattern - The pattern to match table names againstCompletableFuture. The return HTDs are read-only.public 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)
isTableAvailable 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<Pair<Integer,Integer>> getAlterStatus(TableName tableName)
AsyncAdmingetAlterStatus in interface AsyncAdmintableName - TableName instanceCompletableFuture.public CompletableFuture<Void> addColumnFamily(TableName tableName, HColumnDescriptor 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, HColumnDescriptor 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<NamespaceDescriptor[]> listNamespaceDescriptors()
AsyncAdminlistNamespaceDescriptors in interface AsyncAdminCompletableFuture.public CompletableFuture<Boolean> setBalancerRunning(boolean on)
AsyncAdminsetBalancerRunning in interface AsyncAdminCompletableFuture.public CompletableFuture<Boolean> balancer()
AsyncAdminbalancer in interface AsyncAdminCompletableFuture.public CompletableFuture<Boolean> balancer(boolean force)
AsyncAdminbalancer in interface AsyncAdminforce - whether we should force balance even if there is region in transition.CompletableFuture.public CompletableFuture<Boolean> isBalancerEnabled()
AsyncAdminisBalancerEnabled in interface AsyncAdminCompletableFuture.public CompletableFuture<Void> closeRegion(String regionname, String serverName)
AsyncAdmincloseRegion in interface AsyncAdminregionname - region name to closeserverName - If supplied, we'll use this location rather than the one currently in
hbase:metapublic CompletableFuture<Void> closeRegion(byte[] regionName, String serverName)
AsyncAdmincloseRegion in interface AsyncAdminregionName - region name to closeserverName - The servername of the regionserver. If passed null we will use servername
found in the hbase:meta table. A server name is made of host, port and startcode. Here is an
example: host187.example.com,60020,1289493121758public CompletableFuture<Boolean> closeRegionWithEncodedRegionName(String encodedRegionName, String serverName)
AsyncAdmincloseRegionWithEncodedRegionName in interface AsyncAdminencodedRegionName - The encoded region name; i.e. the hash that makes up the region name
suffix: e.g. if regionname is
TestTable,0094429456,1289497600452.527db22f95c8a9e0116f0cc13c680396.,
then the encoded region name is: 527db22f95c8a9e0116f0cc13c680396.serverName - The servername of the regionserver. A server name is made of host, port and
startcode. This is mandatory. Here is an example:
host187.example.com,60020,1289493121758CompletableFuture.public CompletableFuture<Void> closeRegion(ServerName sn, HRegionInfo hri)
AsyncAdmincloseRegion in interface AsyncAdminpublic CompletableFuture<List<HRegionInfo>> getOnlineRegions(ServerName sn)
AsyncAdmingetOnlineRegions 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)
AsyncAdmincompact in interface AsyncAdmintableName - table to compactpublic CompletableFuture<Void> compact(TableName tableName, byte[] columnFamily)
AsyncAdmincompact in interface AsyncAdmintableName - table to compactcolumnFamily - column family within a tablepublic 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 regionpublic CompletableFuture<Void> majorCompact(TableName tableName)
AsyncAdminmajorCompact in interface AsyncAdmintableName - table to major compactpublic CompletableFuture<Void> majorCompact(TableName tableName, byte[] columnFamily)
AsyncAdminmajorCompact in interface AsyncAdmintableName - table to major compactcolumnFamily - column family within a tablepublic CompletableFuture<Void> majorCompactRegion(byte[] regionName)
AsyncAdminmajorCompactRegion in interface AsyncAdminregionName - region to major compactpublic CompletableFuture<Void> majorCompactRegion(byte[] regionName, byte[] columnFamily)
AsyncAdminmajorCompactRegion in interface AsyncAdminregionName - egion to major compactcolumnFamily - column family within a regionpublic CompletableFuture<Void> compactRegionServer(ServerName sn)
AsyncAdmincompactRegionServer in interface AsyncAdminsn - the region server namepublic CompletableFuture<Void> majorCompactRegionServer(ServerName sn)
AsyncAdminmajorCompactRegionServer in interface AsyncAdminsn - the region server namepublic 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> splitRegion(byte[] regionName)
AsyncAdminsplitRegion in interface AsyncAdminregionName - region 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, byte[] splitPoint)
AsyncAdminsplitRegion in interface AsyncAdminregionName - region to splitsplitPoint - the explicit position to split onpublic CompletableFuture<Void> split(ServerName sn, HRegionInfo hri, byte[] splitPoint)
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 force)
AsyncAdminAsyncAdmin.move(byte[], byte[]) 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.force - 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, byte[] destServerName)
AsyncAdminr to dest.move in interface AsyncAdminregionName - Encoded or full name of region to move.destServerName - The servername of the destination regionserver. If passed the empty byte
array 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 id, Map<TableName,? extends Collection<String>> tableCfs)
AsyncAdminappendReplicationPeerTableCFs in interface AsyncAdminid - a short that identifies the clustertableCfs - A map from tableName to column family namespublic CompletableFuture<Void> removeReplicationPeerTableCFs(String id, Map<TableName,? extends Collection<String>> tableCfs)
AsyncAdminremoveReplicationPeerTableCFs in interface AsyncAdminid - 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(String regex)
AsyncAdminlistReplicationPeers in interface AsyncAdminregex - The regular expression to match peer idCompletableFuture.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> snapshot(String snapshotName, TableName tableName)
AsyncAdminSnapshotCreationException indicating the duplicate
naming. Snapshot names follow the same naming constraints as tables in HBase. See
TableName.isLegalFullyQualifiedTableName(byte[]).snapshot in interface AsyncAdminsnapshotName - name of the snapshot to be createdtableName - name of the table for which snapshot is createdpublic CompletableFuture<Void> snapshot(String snapshotName, TableName tableName, SnapshotType type)
AsyncAdminSnapshotCreationException indicating the duplicate
naming. Snapshot names follow the same naming constraints as tables in HBase. See
TableName.isLegalFullyQualifiedTableName(byte[]).snapshot in interface AsyncAdminsnapshotName - name to give the snapshot on the filesystem. Must be unique from all other
snapshots stored on the clustertableName - name of the table to snapshottype - type of snapshot to takepublic CompletableFuture<Void> snapshot(SnapshotDescription snapshotDesc)
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 AsyncAdminsnapshotDesc - 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()
AsyncAdminlistSnapshots in interface AsyncAdminCompletableFuturepublic CompletableFuture<List<SnapshotDescription>> listSnapshots(String regex)
AsyncAdminlistSnapshots in interface AsyncAdminregex - The regular expression to match againstCompletableFuturepublic CompletableFuture<List<SnapshotDescription>> listSnapshots(Pattern pattern)
AsyncAdminlistSnapshots in interface AsyncAdminpattern - The compiled regular expression to match againstCompletableFuturepublic CompletableFuture<List<SnapshotDescription>> listTableSnapshots(String tableNameRegex, String snapshotNameRegex)
AsyncAdminlistTableSnapshots in interface AsyncAdmintableNameRegex - The table name regular expression to match againstsnapshotNameRegex - The snapshot 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(String regex)
AsyncAdmindeleteSnapshots in interface AsyncAdminregex - The regular expression to match againstpublic CompletableFuture<Void> deleteSnapshots(Pattern snapshotNamePattern)
AsyncAdmindeleteSnapshots in interface AsyncAdminsnapshotNamePattern - pattern for names of the snapshot to matchpublic CompletableFuture<Void> deleteTableSnapshots(String tableNameRegex, String snapshotNameRegex)
AsyncAdmindeleteTableSnapshots in interface AsyncAdmintableNameRegex - The table name regular expression to match againstsnapshotNameRegex - The snapshot 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[]> 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<ProcedureInfo[]> listProcedures()
AsyncAdminlistProcedures in interface AsyncAdminCompletableFutureCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.