@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 AsyncAdmin
public CompletableFuture<Boolean> tableExists(TableName tableName)
tableExists
in interface AsyncAdmin
tableName
- Table to check.CompletableFuture
.public CompletableFuture<TableDescriptor[]> listTables()
AsyncAdmin
listTables
in interface AsyncAdmin
CompletableFuture
.AsyncAdmin.listTables(Pattern, boolean)
public CompletableFuture<TableDescriptor[]> listTables(String regex, boolean includeSysTables)
AsyncAdmin
listTables
in interface AsyncAdmin
regex
- 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)
AsyncAdmin
listTables
in interface AsyncAdmin
pattern
- The compiled regular expression to match againstincludeSysTables
- False to match only against userspace tablesCompletableFuture
.public CompletableFuture<TableName[]> listTableNames()
AsyncAdmin
listTableNames
in interface AsyncAdmin
CompletableFuture
.AsyncAdmin.listTableNames(Pattern, boolean)
public CompletableFuture<TableName[]> listTableNames(String regex, boolean includeSysTables)
AsyncAdmin
listTableNames
in interface AsyncAdmin
regex
- 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)
AsyncAdmin
listTableNames
in interface AsyncAdmin
pattern
- The regular expression to match againstincludeSysTables
- False to match only against userspace tablesCompletableFuture
.public CompletableFuture<TableDescriptor> getTableDescriptor(TableName tableName)
AsyncAdmin
getTableDescriptor
in interface AsyncAdmin
tableName
- as a TableName
CompletableFuture
.public CompletableFuture<Void> createTable(TableDescriptor desc)
AsyncAdmin
createTable
in interface AsyncAdmin
desc
- table descriptor for tablepublic CompletableFuture<Void> createTable(TableDescriptor desc, byte[] startKey, byte[] endKey, int numRegions)
AsyncAdmin
createTable
in interface AsyncAdmin
desc
- 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)
AsyncAdmin
createTable
in interface AsyncAdmin
desc
- table descriptor for tablesplitKeys
- array of split keys for the initial regions of the tablepublic CompletableFuture<Void> deleteTable(TableName tableName)
AsyncAdmin
deleteTable
in interface AsyncAdmin
tableName
- name of table to deletepublic CompletableFuture<TableDescriptor[]> deleteTables(String regex)
AsyncAdmin
AsyncAdmin.listTables(String, boolean)
and
AsyncAdmin.deleteTable(org.apache.hadoop.hbase.TableName)
deleteTables
in interface AsyncAdmin
regex
- The regular expression to match table names againstCompletableFuture
. The return HTDs are read-only.public CompletableFuture<TableDescriptor[]> deleteTables(Pattern pattern)
AsyncAdmin
AsyncAdmin.listTables(Pattern, boolean)
and
AsyncAdmin.deleteTable(org.apache.hadoop.hbase.TableName)
deleteTables
in interface AsyncAdmin
pattern
- The pattern to match table names againstCompletableFuture
. The return HTDs are read-only.public CompletableFuture<Void> truncateTable(TableName tableName, boolean preserveSplits)
AsyncAdmin
truncateTable
in interface AsyncAdmin
tableName
- name of table to truncatepreserveSplits
- True if the splits should be preservedpublic CompletableFuture<Void> enableTable(TableName tableName)
AsyncAdmin
enableTable
in interface AsyncAdmin
tableName
- name of the tablepublic CompletableFuture<TableDescriptor[]> enableTables(String regex)
AsyncAdmin
AsyncAdmin.listTables(Pattern, boolean)
and
AsyncAdmin.enableTable(TableName)
enableTables
in interface AsyncAdmin
regex
- The regular expression to match table names againstCompletableFuture
. The return HTDs are read-only.public CompletableFuture<TableDescriptor[]> enableTables(Pattern pattern)
AsyncAdmin
AsyncAdmin.listTables(Pattern, boolean)
and
AsyncAdmin.enableTable(TableName)
enableTables
in interface AsyncAdmin
pattern
- The pattern to match table names againstCompletableFuture
. The return HTDs are read-only.public CompletableFuture<Void> disableTable(TableName tableName)
AsyncAdmin
disableTable
in interface AsyncAdmin
public CompletableFuture<TableDescriptor[]> disableTables(String regex)
AsyncAdmin
AsyncAdmin.listTables(Pattern, boolean)
and
AsyncAdmin.disableTable(TableName)
disableTables
in interface AsyncAdmin
regex
- The regular expression to match table names againstCompletableFuture
. The return HTDs are read-only.public CompletableFuture<TableDescriptor[]> disableTables(Pattern pattern)
AsyncAdmin
AsyncAdmin.listTables(Pattern, boolean)
and
AsyncAdmin.disableTable(TableName)
disableTables
in interface AsyncAdmin
pattern
- The pattern to match table names againstCompletableFuture
. The return HTDs are read-only.public CompletableFuture<Boolean> isTableEnabled(TableName tableName)
isTableEnabled
in interface AsyncAdmin
tableName
- name of table to checkCompletableFuture
.public CompletableFuture<Boolean> isTableDisabled(TableName tableName)
isTableDisabled
in interface AsyncAdmin
tableName
- name of table to checkCompletableFuture
.public CompletableFuture<Boolean> isTableAvailable(TableName tableName)
isTableAvailable
in interface AsyncAdmin
tableName
- name of table to checkCompletableFuture
.public CompletableFuture<Boolean> isTableAvailable(TableName tableName, byte[][] splitKeys)
AsyncAdmin
CompletableFuture
.isTableAvailable
in interface AsyncAdmin
tableName
- 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)
AsyncAdmin
getAlterStatus
in interface AsyncAdmin
tableName
- TableName instanceCompletableFuture
.public CompletableFuture<Void> addColumnFamily(TableName tableName, HColumnDescriptor columnFamily)
AsyncAdmin
addColumnFamily
in interface AsyncAdmin
tableName
- 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)
AsyncAdmin
deleteColumnFamily
in interface AsyncAdmin
tableName
- name of tablecolumnFamily
- name of column family to be deletedpublic CompletableFuture<Void> modifyColumnFamily(TableName tableName, HColumnDescriptor columnFamily)
AsyncAdmin
modifyColumnFamily
in interface AsyncAdmin
tableName
- name of tablecolumnFamily
- new column family descriptor to usepublic CompletableFuture<Void> createNamespace(NamespaceDescriptor descriptor)
AsyncAdmin
createNamespace
in interface AsyncAdmin
descriptor
- descriptor which describes the new namespacepublic CompletableFuture<Void> modifyNamespace(NamespaceDescriptor descriptor)
AsyncAdmin
modifyNamespace
in interface AsyncAdmin
descriptor
- descriptor which describes the new namespacepublic CompletableFuture<Void> deleteNamespace(String name)
AsyncAdmin
deleteNamespace
in interface AsyncAdmin
name
- namespace namepublic CompletableFuture<NamespaceDescriptor> getNamespaceDescriptor(String name)
AsyncAdmin
getNamespaceDescriptor
in interface AsyncAdmin
name
- name of namespace descriptorCompletableFuture
.public CompletableFuture<NamespaceDescriptor[]> listNamespaceDescriptors()
AsyncAdmin
listNamespaceDescriptors
in interface AsyncAdmin
CompletableFuture
.public CompletableFuture<Boolean> setBalancerRunning(boolean on)
AsyncAdmin
setBalancerRunning
in interface AsyncAdmin
CompletableFuture
.public CompletableFuture<Boolean> balancer()
AsyncAdmin
balancer
in interface AsyncAdmin
CompletableFuture
.public CompletableFuture<Boolean> balancer(boolean force)
AsyncAdmin
balancer
in interface AsyncAdmin
force
- whether we should force balance even if there is region in transition.CompletableFuture
.public CompletableFuture<Boolean> isBalancerEnabled()
AsyncAdmin
isBalancerEnabled
in interface AsyncAdmin
CompletableFuture
.public CompletableFuture<Void> closeRegion(String regionname, String serverName)
AsyncAdmin
closeRegion
in interface AsyncAdmin
regionname
- region name to closeserverName
- If supplied, we'll use this location rather than the one currently in
hbase:meta
public CompletableFuture<Void> closeRegion(byte[] regionName, String serverName)
AsyncAdmin
closeRegion
in interface AsyncAdmin
regionName
- 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,1289493121758
public CompletableFuture<Boolean> closeRegionWithEncodedRegionName(String encodedRegionName, String serverName)
AsyncAdmin
closeRegionWithEncodedRegionName
in interface AsyncAdmin
encodedRegionName
- 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,1289493121758
CompletableFuture
.public CompletableFuture<Void> closeRegion(ServerName sn, HRegionInfo hri)
AsyncAdmin
closeRegion
in interface AsyncAdmin
public CompletableFuture<List<HRegionInfo>> getOnlineRegions(ServerName sn)
AsyncAdmin
getOnlineRegions
in interface AsyncAdmin
public CompletableFuture<Void> flush(TableName tableName)
AsyncAdmin
flush
in interface AsyncAdmin
tableName
- table to flushpublic CompletableFuture<Void> flushRegion(byte[] regionName)
AsyncAdmin
flushRegion
in interface AsyncAdmin
regionName
- region to flushpublic CompletableFuture<Void> compact(TableName tableName)
AsyncAdmin
compact
in interface AsyncAdmin
tableName
- table to compactpublic CompletableFuture<Void> compact(TableName tableName, byte[] columnFamily)
AsyncAdmin
compact
in interface AsyncAdmin
tableName
- table to compactcolumnFamily
- column family within a tablepublic CompletableFuture<Void> compactRegion(byte[] regionName)
AsyncAdmin
compactRegion
in interface AsyncAdmin
regionName
- region to compactpublic CompletableFuture<Void> compactRegion(byte[] regionName, byte[] columnFamily)
AsyncAdmin
compactRegion
in interface AsyncAdmin
regionName
- region to compactcolumnFamily
- column family within a regionpublic CompletableFuture<Void> majorCompact(TableName tableName)
AsyncAdmin
majorCompact
in interface AsyncAdmin
tableName
- table to major compactpublic CompletableFuture<Void> majorCompact(TableName tableName, byte[] columnFamily)
AsyncAdmin
majorCompact
in interface AsyncAdmin
tableName
- table to major compactcolumnFamily
- column family within a tablepublic CompletableFuture<Void> majorCompactRegion(byte[] regionName)
AsyncAdmin
majorCompactRegion
in interface AsyncAdmin
regionName
- region to major compactpublic CompletableFuture<Void> majorCompactRegion(byte[] regionName, byte[] columnFamily)
AsyncAdmin
majorCompactRegion
in interface AsyncAdmin
regionName
- egion to major compactcolumnFamily
- column family within a regionpublic CompletableFuture<Void> compactRegionServer(ServerName sn)
AsyncAdmin
compactRegionServer
in interface AsyncAdmin
sn
- the region server namepublic CompletableFuture<Void> majorCompactRegionServer(ServerName sn)
AsyncAdmin
majorCompactRegionServer
in interface AsyncAdmin
sn
- the region server namepublic CompletableFuture<Void> mergeRegions(byte[] nameOfRegionA, byte[] nameOfRegionB, boolean forcible)
AsyncAdmin
mergeRegions
in interface AsyncAdmin
nameOfRegionA
- 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)
AsyncAdmin
split
in interface AsyncAdmin
tableName
- table to splitpublic CompletableFuture<Void> splitRegion(byte[] regionName)
AsyncAdmin
splitRegion
in interface AsyncAdmin
regionName
- region to splitpublic CompletableFuture<Void> split(TableName tableName, byte[] splitPoint)
AsyncAdmin
split
in interface AsyncAdmin
tableName
- table to splitsplitPoint
- the explicit position to split onpublic CompletableFuture<Void> splitRegion(byte[] regionName, byte[] splitPoint)
AsyncAdmin
splitRegion
in interface AsyncAdmin
regionName
- 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 AsyncAdmin
regionName
- Encoded or full name of region to assign.public CompletableFuture<Void> unassign(byte[] regionName, boolean force)
AsyncAdmin
AsyncAdmin.move(byte[], byte[])
if you want to control the region movement.unassign
in interface AsyncAdmin
regionName
- 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)
AsyncAdmin
offline
in interface AsyncAdmin
regionName
- Encoded or full name of region to offlinepublic CompletableFuture<Void> move(byte[] regionName, byte[] destServerName)
AsyncAdmin
r
to dest
.move
in interface AsyncAdmin
regionName
- 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,1289493121758
public CompletableFuture<Void> setQuota(QuotaSettings quota)
AsyncAdmin
setQuota
in interface AsyncAdmin
quota
- the quota settingspublic CompletableFuture<List<QuotaSettings>> getQuota(QuotaFilter filter)
AsyncAdmin
getQuota
in interface AsyncAdmin
filter
- the quota settings filterpublic CompletableFuture<Void> addReplicationPeer(String peerId, ReplicationPeerConfig peerConfig)
AsyncAdmin
addReplicationPeer
in interface AsyncAdmin
peerId
- a short name that identifies the peerpeerConfig
- configuration for the replication slave clusterpublic CompletableFuture<Void> removeReplicationPeer(String peerId)
AsyncAdmin
removeReplicationPeer
in interface AsyncAdmin
peerId
- a short name that identifies the peerpublic CompletableFuture<Void> enableReplicationPeer(String peerId)
AsyncAdmin
enableReplicationPeer
in interface AsyncAdmin
peerId
- a short name that identifies the peerpublic CompletableFuture<Void> disableReplicationPeer(String peerId)
AsyncAdmin
disableReplicationPeer
in interface AsyncAdmin
peerId
- a short name that identifies the peerpublic CompletableFuture<ReplicationPeerConfig> getReplicationPeerConfig(String peerId)
AsyncAdmin
getReplicationPeerConfig
in interface AsyncAdmin
peerId
- a short name that identifies the peerCompletableFuture
.public CompletableFuture<Void> updateReplicationPeerConfig(String peerId, ReplicationPeerConfig peerConfig)
AsyncAdmin
updateReplicationPeerConfig
in interface AsyncAdmin
peerId
- a short name that identifies the peerpeerConfig
- new config for the peerpublic CompletableFuture<Void> appendReplicationPeerTableCFs(String id, Map<TableName,? extends Collection<String>> tableCfs)
AsyncAdmin
appendReplicationPeerTableCFs
in interface AsyncAdmin
id
- 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)
AsyncAdmin
removeReplicationPeerTableCFs
in interface AsyncAdmin
id
- a short name that identifies the clustertableCfs
- A map from tableName to column family namespublic CompletableFuture<List<ReplicationPeerDescription>> listReplicationPeers()
AsyncAdmin
listReplicationPeers
in interface AsyncAdmin
CompletableFuture
.public CompletableFuture<List<ReplicationPeerDescription>> listReplicationPeers(String regex)
AsyncAdmin
listReplicationPeers
in interface AsyncAdmin
regex
- The regular expression to match peer idCompletableFuture
.public CompletableFuture<List<ReplicationPeerDescription>> listReplicationPeers(Pattern pattern)
AsyncAdmin
listReplicationPeers
in interface AsyncAdmin
pattern
- The compiled regular expression to match peer idCompletableFuture
.public CompletableFuture<List<TableCFs>> listReplicatedTableCFs()
AsyncAdmin
listReplicatedTableCFs
in interface AsyncAdmin
CompletableFuture
.public CompletableFuture<Void> snapshot(String snapshotName, TableName tableName)
AsyncAdmin
SnapshotCreationException
indicating the duplicate
naming. Snapshot names follow the same naming constraints as tables in HBase. See
TableName.isLegalFullyQualifiedTableName(byte[])
.snapshot
in interface AsyncAdmin
snapshotName
- 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)
AsyncAdmin
SnapshotCreationException
indicating the duplicate
naming. Snapshot names follow the same naming constraints as tables in HBase. See
TableName.isLegalFullyQualifiedTableName(byte[])
.snapshot
in interface AsyncAdmin
snapshotName
- 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)
AsyncAdmin
SnapshotCreationException
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 AsyncAdmin
snapshotDesc
- snapshot to takepublic CompletableFuture<Boolean> isSnapshotFinished(SnapshotDescription snapshot)
AsyncAdmin
UnknownSnapshotException
.isSnapshotFinished
in interface AsyncAdmin
snapshot
- description of the snapshot to checkpublic CompletableFuture<Void> restoreSnapshot(String snapshotName)
AsyncAdmin
restoreSnapshot
in interface AsyncAdmin
snapshotName
- name of the snapshot to restorepublic CompletableFuture<Void> restoreSnapshot(String snapshotName, boolean takeFailSafeSnapshot)
AsyncAdmin
restoreSnapshot
in interface AsyncAdmin
snapshotName
- name of the snapshot to restoretakeFailSafeSnapshot
- true if the failsafe snapshot should be takenpublic CompletableFuture<Void> cloneSnapshot(String snapshotName, TableName tableName)
AsyncAdmin
cloneSnapshot
in interface AsyncAdmin
snapshotName
- name of the snapshot to be clonedtableName
- name of the table where the snapshot will be restoredpublic CompletableFuture<List<SnapshotDescription>> listSnapshots()
AsyncAdmin
listSnapshots
in interface AsyncAdmin
CompletableFuture
public CompletableFuture<List<SnapshotDescription>> listSnapshots(String regex)
AsyncAdmin
listSnapshots
in interface AsyncAdmin
regex
- The regular expression to match againstCompletableFuture
public CompletableFuture<List<SnapshotDescription>> listSnapshots(Pattern pattern)
AsyncAdmin
listSnapshots
in interface AsyncAdmin
pattern
- The compiled regular expression to match againstCompletableFuture
public CompletableFuture<List<SnapshotDescription>> listTableSnapshots(String tableNameRegex, String snapshotNameRegex)
AsyncAdmin
listTableSnapshots
in interface AsyncAdmin
tableNameRegex
- The table name regular expression to match againstsnapshotNameRegex
- The snapshot name regular expression to match againstCompletableFuture
public CompletableFuture<List<SnapshotDescription>> listTableSnapshots(Pattern tableNamePattern, Pattern snapshotNamePattern)
AsyncAdmin
listTableSnapshots
in interface AsyncAdmin
tableNamePattern
- The compiled table name regular expression to match againstsnapshotNamePattern
- The compiled snapshot name regular expression to match againstCompletableFuture
public CompletableFuture<Void> deleteSnapshot(String snapshotName)
AsyncAdmin
deleteSnapshot
in interface AsyncAdmin
snapshotName
- name of the snapshotpublic CompletableFuture<Void> deleteSnapshots(String regex)
AsyncAdmin
deleteSnapshots
in interface AsyncAdmin
regex
- The regular expression to match againstpublic CompletableFuture<Void> deleteSnapshots(Pattern snapshotNamePattern)
AsyncAdmin
deleteSnapshots
in interface AsyncAdmin
snapshotNamePattern
- pattern for names of the snapshot to matchpublic CompletableFuture<Void> deleteTableSnapshots(String tableNameRegex, String snapshotNameRegex)
AsyncAdmin
deleteTableSnapshots
in interface AsyncAdmin
tableNameRegex
- The table name regular expression to match againstsnapshotNameRegex
- The snapshot name regular expression to match againstpublic CompletableFuture<Void> deleteTableSnapshots(Pattern tableNamePattern, Pattern snapshotNamePattern)
AsyncAdmin
deleteTableSnapshots
in interface AsyncAdmin
tableNamePattern
- 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)
AsyncAdmin
execProcedure
in interface AsyncAdmin
signature
- 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)
AsyncAdmin
execProcedureWithRet
in interface AsyncAdmin
signature
- 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)
AsyncAdmin
isProcedureFinished
in interface AsyncAdmin
signature
- The signature that uniquely identifies a procedureinstance
- The instance name of the procedureprops
- Property/Value pairs of properties passing to the procedureCompletableFuture
public CompletableFuture<Boolean> abortProcedure(long procId, boolean mayInterruptIfRunning)
AsyncAdmin
abortProcedure
in interface AsyncAdmin
procId
- ID of the procedure to abortmayInterruptIfRunning
- if the proc completed at least one step, should it be aborted?CompletableFuture
public CompletableFuture<ProcedureInfo[]> listProcedures()
AsyncAdmin
listProcedures
in interface AsyncAdmin
CompletableFuture
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.