@InterfaceAudience.Public public interface AsyncAdmin
This feature is still under development, so marked as IA.Private. Will change to public when done. Use it with caution.
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) |
default CompletableFuture<Boolean> |
balance()
Invoke the balancer.
|
CompletableFuture<Boolean> |
balance(boolean forcible)
Invoke the balancer.
|
CompletableFuture<Void> |
clearCompactionQueues(ServerName serverName,
Set<String> queues)
Clear compacting queues on a region server.
|
CompletableFuture<Void> |
cloneSnapshot(String snapshotName,
TableName tableName)
Create a new table by cloning the snapshot content.
|
CompletableFuture<Boolean> |
closeRegion(byte[] regionName,
Optional<ServerName> serverName)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0
(HBASE-18231).
Use
unassign(byte[], boolean) . |
default CompletableFuture<Void> |
compact(TableName tableName)
Compact a table.
|
CompletableFuture<Void> |
compact(TableName tableName,
Optional<byte[]> columnFamily)
Compact a column family within a table.
|
default CompletableFuture<Void> |
compactRegion(byte[] regionName)
Compact an individual region.
|
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.
|
default CompletableFuture<Void> |
createTable(TableDescriptor desc)
Creates a new table.
|
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> |
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.
|
default CompletableFuture<Void> |
deleteSnapshots(Pattern pattern)
Delete existing snapshots whose names match the pattern passed.
|
CompletableFuture<Void> |
deleteTable(TableName tableName)
Deletes a table.
|
CompletableFuture<List<TableDescriptor>> |
deleteTables(Pattern pattern)
Delete 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> |
disableReplicationPeer(String peerId)
Stop the replication stream to the specified peer
|
CompletableFuture<Void> |
disableTable(TableName tableName)
Disable a table.
|
CompletableFuture<List<TableDescriptor>> |
disableTables(Pattern pattern)
Disable tables matching the passed in pattern.
|
CompletableFuture<Void> |
drainRegionServers(List<ServerName> servers)
Mark a region server as draining to prevent additional regions from getting assigned to it.
|
CompletableFuture<Void> |
enableReplicationPeer(String peerId)
Restart the replication stream to the specified peer
|
CompletableFuture<Void> |
enableTable(TableName tableName)
Enable a table.
|
CompletableFuture<List<TableDescriptor>> |
enableTables(Pattern pattern)
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.
|
default CompletableFuture<Collection<ServerName>> |
getBackupMasters() |
CompletableFuture<ClusterStatus> |
getClusterStatus() |
CompletableFuture<ClusterStatus> |
getClusterStatus(ClusterStatus.Options 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.
|
default CompletableFuture<ServerName> |
getMaster() |
CompletableFuture<NamespaceDescriptor> |
getNamespaceDescriptor(String name)
Get a namespace descriptor by name
|
CompletableFuture<List<HRegionInfo>> |
getOnlineRegions(ServerName serverName)
Get all the online regions on a region server.
|
CompletableFuture<List<QuotaSettings>> |
getQuota(QuotaFilter filter)
List the quotas based on the filter.
|
default CompletableFuture<List<RegionLoad>> |
getRegionLoads(ServerName serverName)
Get a list of
RegionLoad of all regions hosted on a region seerver. |
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. |
default CompletableFuture<Collection<ServerName>> |
getRegionServers() |
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<HRegionInfo>> |
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.
|
default 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<List<ServerName>> |
listDrainingRegionServers()
List region servers marked as draining to not get additional regions assigned to them.
|
CompletableFuture<List<NamespaceDescriptor>> |
listNamespaceDescriptors()
List available namespace descriptors
|
CompletableFuture<List<LockInfo>> |
listProcedureLocks()
List procedure locks.
|
CompletableFuture<List<ProcedureInfo>> |
listProcedures()
List procedures
|
CompletableFuture<List<TableCFs>> |
listReplicatedTableCFs()
Find all table and column families that are replicated from this cluster
|
default CompletableFuture<List<ReplicationPeerDescription>> |
listReplicationPeers()
Return a list of replication peers.
|
CompletableFuture<List<ReplicationPeerDescription>> |
listReplicationPeers(Optional<Pattern> pattern)
Return a list of replication peers.
|
default CompletableFuture<List<SnapshotDescription>> |
listSnapshots()
List completed snapshots.
|
CompletableFuture<List<SnapshotDescription>> |
listSnapshots(Optional<Pattern> pattern)
List all the completed snapshots matching the given pattern.
|
default CompletableFuture<List<TableName>> |
listTableNames()
List all of the names of userspace tables.
|
CompletableFuture<List<TableName>> |
listTableNames(Optional<Pattern> pattern,
boolean includeSysTables)
List all of the names of userspace tables.
|
default CompletableFuture<List<TableDescriptor>> |
listTables()
List all the 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.
|
default CompletableFuture<Void> |
majorCompact(TableName tableName)
Major compact a table.
|
CompletableFuture<Void> |
majorCompact(TableName tableName,
Optional<byte[]> columnFamily)
Major compact a column family within a table.
|
default CompletableFuture<Void> |
majorCompactRegion(byte[] regionName)
Major compact a region.
|
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> |
removeDrainFromRegionServers(List<ServerName> servers)
Remove drain from a region server to allow additional 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 on)
Turn the catalog janitor on/off.
|
CompletableFuture<Boolean> |
setCleanerChoreOn(boolean on)
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.
|
default CompletableFuture<Void> |
snapshot(String snapshotName,
TableName tableName)
Take a snapshot for the given table.
|
default CompletableFuture<Void> |
snapshot(String snapshotName,
TableName tableName,
SnapshotType type)
Create typed snapshot of the table.
|
CompletableFuture<Void> |
split(TableName tableName)
Split a table.
|
CompletableFuture<Void> |
split(TableName tableName,
byte[] splitPoint)
Split a table.
|
default CompletableFuture<Void> |
splitRegion(byte[] regionName)
Split an individual region.
|
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
|
CompletableFuture<Boolean> tableExists(TableName tableName)
tableName
- Table to check.CompletableFuture
.default CompletableFuture<List<TableDescriptor>> listTables()
CompletableFuture
.listTables(Optional, boolean)
CompletableFuture<List<TableDescriptor>> listTables(Optional<Pattern> pattern, boolean includeSysTables)
pattern
- The compiled regular expression to match againstincludeSysTables
- False to match only against userspace tablesCompletableFuture
.default CompletableFuture<List<TableName>> listTableNames()
CompletableFuture
.listTableNames(Optional, boolean)
CompletableFuture<List<TableName>> listTableNames(Optional<Pattern> pattern, boolean includeSysTables)
pattern
- The regular expression to match againstincludeSysTables
- False to match only against userspace tablesCompletableFuture
.CompletableFuture<TableDescriptor> getTableDescriptor(TableName tableName)
tableName
- as a TableName
CompletableFuture
.default CompletableFuture<Void> createTable(TableDescriptor desc)
desc
- table descriptor for tableCompletableFuture<Void> createTable(TableDescriptor desc, byte[] startKey, byte[] endKey, int numRegions)
desc
- table descriptor for tablestartKey
- beginning of key rangeendKey
- end of key rangenumRegions
- the total number of regions to createCompletableFuture<Void> createTable(TableDescriptor desc, Optional<byte[][]> splitKeys)
desc
- table descriptor for tablesplitKeys
- array of split keys for the initial regions of the tableCompletableFuture<Void> deleteTable(TableName tableName)
tableName
- name of table to deleteCompletableFuture<List<TableDescriptor>> deleteTables(Pattern pattern)
listTableNames(Optional, boolean)
and
deleteTable(org.apache.hadoop.hbase.TableName)
pattern
- The pattern to match table names againstCompletableFuture
. The return HTDs are read-only.CompletableFuture<Void> truncateTable(TableName tableName, boolean preserveSplits)
tableName
- name of table to truncatepreserveSplits
- True if the splits should be preservedCompletableFuture<Void> enableTable(TableName tableName)
tableName
- name of the tableCompletableFuture<List<TableDescriptor>> enableTables(Pattern pattern)
listTables(Optional, boolean)
and
enableTable(TableName)
pattern
- The pattern to match table names againstCompletableFuture
. The return HTDs are read-only.CompletableFuture<Void> disableTable(TableName tableName)
tableName
- CompletableFuture<List<TableDescriptor>> disableTables(Pattern pattern)
listTables(Optional, boolean)
and
disableTable(TableName)
pattern
- The pattern to match table names againstCompletableFuture
. The return HTDs are read-only.CompletableFuture<Boolean> isTableEnabled(TableName tableName)
tableName
- name of table to checkCompletableFuture
.CompletableFuture<Boolean> isTableDisabled(TableName tableName)
tableName
- name of table to checkCompletableFuture
.default CompletableFuture<Boolean> isTableAvailable(TableName tableName)
tableName
- name of table to checkCompletableFuture
.CompletableFuture<Boolean> isTableAvailable(TableName tableName, byte[][] splitKeys)
CompletableFuture
.tableName
- name of table to checksplitKeys
- keys to check if the table has been created with all split keysCompletableFuture<Pair<Integer,Integer>> getAlterStatus(TableName tableName)
tableName
- TableName instanceCompletableFuture
.CompletableFuture<Void> addColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamily)
tableName
- name of the table to add column family tocolumnFamily
- column family descriptor of column family to be addedCompletableFuture<Void> deleteColumnFamily(TableName tableName, byte[] columnFamily)
tableName
- name of tablecolumnFamily
- name of column family to be deletedCompletableFuture<Void> modifyColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamily)
tableName
- name of tablecolumnFamily
- new column family descriptor to useCompletableFuture<Void> createNamespace(NamespaceDescriptor descriptor)
descriptor
- descriptor which describes the new namespaceCompletableFuture<Void> modifyNamespace(NamespaceDescriptor descriptor)
descriptor
- descriptor which describes the new namespaceCompletableFuture<Void> deleteNamespace(String name)
name
- namespace nameCompletableFuture<NamespaceDescriptor> getNamespaceDescriptor(String name)
name
- name of namespace descriptorCompletableFuture
.CompletableFuture<List<NamespaceDescriptor>> listNamespaceDescriptors()
CompletableFuture
.@Deprecated CompletableFuture<Boolean> closeRegion(byte[] regionName, Optional<ServerName> serverName)
unassign(byte[], boolean)
.regionName
- region name to closeserverName
- Deprecated. Not used anymore after deprecation.CompletableFuture<List<HRegionInfo>> getOnlineRegions(ServerName serverName)
CompletableFuture<List<HRegionInfo>> getTableRegions(TableName tableName)
CompletableFuture<Void> flush(TableName tableName)
tableName
- table to flushCompletableFuture<Void> flushRegion(byte[] regionName)
regionName
- region to flushdefault CompletableFuture<Void> compact(TableName tableName)
tableName
- table to compactCompletableFuture<Void> compact(TableName tableName, Optional<byte[]> columnFamily)
tableName
- table to compactcolumnFamily
- column family within a table. If not present, compact the table's all
column families.default CompletableFuture<Void> compactRegion(byte[] regionName)
regionName
- region to compactCompletableFuture<Void> compactRegion(byte[] regionName, Optional<byte[]> columnFamily)
regionName
- region to compactcolumnFamily
- column family within a region. If not present, compact the region's all
column families.default CompletableFuture<Void> majorCompact(TableName tableName)
tableName
- table to major compactCompletableFuture<Void> majorCompact(TableName tableName, Optional<byte[]> columnFamily)
tableName
- table to major compactcolumnFamily
- column family within a table. If not present, major compact the table's all
column families.default CompletableFuture<Void> majorCompactRegion(byte[] regionName)
regionName
- region to major compactCompletableFuture<Void> majorCompactRegion(byte[] regionName, Optional<byte[]> columnFamily)
regionName
- region to major compactcolumnFamily
- column family within a region. If not present, major compact the region's
all column families.CompletableFuture<Void> compactRegionServer(ServerName serverName)
serverName
- the region server nameCompletableFuture<Void> majorCompactRegionServer(ServerName serverName)
serverName
- the region server nameCompletableFuture<Boolean> setMergeOn(boolean on)
on
- CompletableFuture
CompletableFuture<Boolean> isMergeOn()
CompletableFuture
CompletableFuture<Boolean> setSplitOn(boolean on)
on
- CompletableFuture
CompletableFuture<Boolean> isSplitOn()
CompletableFuture
CompletableFuture<Void> mergeRegions(byte[] nameOfRegionA, byte[] nameOfRegionB, boolean forcible)
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
regionsCompletableFuture<Void> split(TableName tableName)
tableName
- table to splitdefault CompletableFuture<Void> splitRegion(byte[] regionName)
regionName
- region to splitCompletableFuture<Void> split(TableName tableName, byte[] splitPoint)
tableName
- table to splitsplitPoint
- the explicit position to split onCompletableFuture<Void> splitRegion(byte[] regionName, Optional<byte[]> splitPoint)
regionName
- region to splitsplitPoint
- the explicit position to split on. If not present, it will decide by region
server.CompletableFuture<Void> assign(byte[] regionName)
regionName
- Encoded or full name of region to assign.CompletableFuture<Void> unassign(byte[] regionName, boolean forcible)
move(byte[], Optional)
if you want to control the region movement.regionName
- 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).CompletableFuture<Void> offline(byte[] regionName)
regionName
- Encoded or full name of region to offlineCompletableFuture<Void> move(byte[] regionName, Optional<ServerName> destServerName)
r
to dest
.regionName
- 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,1289493121758
CompletableFuture<Void> setQuota(QuotaSettings quota)
quota
- the quota settingsCompletableFuture<List<QuotaSettings>> getQuota(QuotaFilter filter)
filter
- the quota settings filterCompletableFuture<Void> addReplicationPeer(String peerId, ReplicationPeerConfig peerConfig)
peerId
- a short name that identifies the peerpeerConfig
- configuration for the replication slave clusterCompletableFuture<Void> removeReplicationPeer(String peerId)
peerId
- a short name that identifies the peerCompletableFuture<Void> enableReplicationPeer(String peerId)
peerId
- a short name that identifies the peerCompletableFuture<Void> disableReplicationPeer(String peerId)
peerId
- a short name that identifies the peerCompletableFuture<ReplicationPeerConfig> getReplicationPeerConfig(String peerId)
peerId
- a short name that identifies the peerCompletableFuture
.CompletableFuture<Void> updateReplicationPeerConfig(String peerId, ReplicationPeerConfig peerConfig)
peerId
- a short name that identifies the peerpeerConfig
- new config for the peerCompletableFuture<Void> appendReplicationPeerTableCFs(String peerId, Map<TableName,? extends Collection<String>> tableCfs)
peerId
- a short that identifies the clustertableCfs
- A map from tableName to column family namesCompletableFuture<Void> removeReplicationPeerTableCFs(String peerId, Map<TableName,? extends Collection<String>> tableCfs)
peerId
- a short name that identifies the clustertableCfs
- A map from tableName to column family namesdefault CompletableFuture<List<ReplicationPeerDescription>> listReplicationPeers()
CompletableFuture
.CompletableFuture<List<ReplicationPeerDescription>> listReplicationPeers(Optional<Pattern> pattern)
pattern
- The compiled regular expression to match peer idCompletableFuture
.CompletableFuture<List<TableCFs>> listReplicatedTableCFs()
CompletableFuture
.default CompletableFuture<Void> snapshot(String snapshotName, TableName tableName)
SnapshotCreationException
indicating the duplicate
naming. Snapshot names follow the same naming constraints as tables in HBase. See
TableName.isLegalFullyQualifiedTableName(byte[])
.snapshotName
- name of the snapshot to be createdtableName
- name of the table for which snapshot is createddefault CompletableFuture<Void> snapshot(String snapshotName, TableName tableName, SnapshotType type)
SnapshotCreationException
indicating the duplicate
naming. Snapshot names follow the same naming constraints as tables in HBase. See
TableName.isLegalFullyQualifiedTableName(byte[])
.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 takeCompletableFuture<Void> snapshot(SnapshotDescription snapshot)
SnapshotCreationException
indicating the duplicate naming. Snapshot names follow the same naming constraints as tables in
HBase. See TableName.isLegalFullyQualifiedTableName(byte[])
.
You should probably use snapshot(String, org.apache.hadoop.hbase.TableName)
unless you
are sure about the type of snapshot that you want to take.snapshot
- snapshot to takeCompletableFuture<Boolean> isSnapshotFinished(SnapshotDescription snapshot)
UnknownSnapshotException
.snapshot
- description of the snapshot to checkCompletableFuture<Void> restoreSnapshot(String snapshotName)
snapshotName
- name of the snapshot to restoreCompletableFuture<Void> restoreSnapshot(String snapshotName, boolean takeFailSafeSnapshot)
snapshotName
- name of the snapshot to restoretakeFailSafeSnapshot
- true if the failsafe snapshot should be takenCompletableFuture<Void> cloneSnapshot(String snapshotName, TableName tableName)
snapshotName
- name of the snapshot to be clonedtableName
- name of the table where the snapshot will be restoreddefault CompletableFuture<List<SnapshotDescription>> listSnapshots()
CompletableFuture
CompletableFuture<List<SnapshotDescription>> listSnapshots(Optional<Pattern> pattern)
pattern
- The compiled regular expression to match againstCompletableFuture
CompletableFuture<List<SnapshotDescription>> listTableSnapshots(Pattern tableNamePattern, Pattern snapshotNamePattern)
tableNamePattern
- The compiled table name regular expression to match againstsnapshotNamePattern
- The compiled snapshot name regular expression to match againstCompletableFuture
CompletableFuture<Void> deleteSnapshot(String snapshotName)
snapshotName
- name of the snapshotdefault CompletableFuture<Void> deleteSnapshots(Pattern pattern)
pattern
- pattern for names of the snapshot to matchCompletableFuture<Void> deleteTableSnapshots(Pattern tableNamePattern, Pattern snapshotNamePattern)
tableNamePattern
- The compiled table name regular expression to match againstsnapshotNamePattern
- The compiled snapshot name regular expression to match againstCompletableFuture<Void> execProcedure(String signature, String instance, Map<String,String> props)
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 procedureCompletableFuture<byte[]> execProcedureWithRet(String signature, String instance, Map<String,String> props)
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 procedureCompletableFuture<Boolean> isProcedureFinished(String signature, String instance, Map<String,String> props)
signature
- The signature that uniquely identifies a procedureinstance
- The instance name of the procedureprops
- Property/Value pairs of properties passing to the procedureCompletableFuture
CompletableFuture<Boolean> abortProcedure(long procId, boolean mayInterruptIfRunning)
procId
- ID of the procedure to abortmayInterruptIfRunning
- if the proc completed at least one step, should it be aborted?CompletableFuture
CompletableFuture<List<ProcedureInfo>> listProcedures()
CompletableFuture
CompletableFuture<List<LockInfo>> listProcedureLocks()
CompletableFuture
CompletableFuture<Void> drainRegionServers(List<ServerName> servers)
servers
- CompletableFuture<List<ServerName>> listDrainingRegionServers()
CompletableFuture
CompletableFuture<Void> removeDrainFromRegionServers(List<ServerName> servers)
servers
- List of region servers to remove drain from.CompletableFuture<ClusterStatus> getClusterStatus()
CompletableFuture
CompletableFuture<ClusterStatus> getClusterStatus(ClusterStatus.Options options)
CompletableFuture
default CompletableFuture<ServerName> getMaster()
CompletableFuture
default CompletableFuture<Collection<ServerName>> getBackupMasters()
CompletableFuture
default CompletableFuture<Collection<ServerName>> getRegionServers()
CompletableFuture
default CompletableFuture<List<RegionLoad>> getRegionLoads(ServerName serverName)
RegionLoad
of all regions hosted on a region seerver.serverName
- RegionLoad
wrapped by CompletableFuture
CompletableFuture<Void> shutdown()
CompletableFuture<Void> stopMaster()
CompletableFuture<Void> stopRegionServer(ServerName serverName)
serverName
- CompletableFuture<Void> updateConfiguration(ServerName serverName)
serverName
- : The server whose config needs to be updated.CompletableFuture<Void> updateConfiguration()
CompletableFuture<Void> rollWALWriter(ServerName serverName)
When 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.
serverName
- The servername of the region server.CompletableFuture<Void> clearCompactionQueues(ServerName serverName, Set<String> queues)
serverName
- queues
- the set of queue nameCompletableFuture<List<RegionLoad>> getRegionLoads(ServerName serverName, Optional<TableName> tableName)
RegionLoad
of all regions hosted on a region seerver for a table.serverName
- tableName
- RegionLoad
wrapped by CompletableFuture
CompletableFuture<Boolean> isMasterInMaintenanceMode()
CompletableFuture
CompletableFuture<CompactionState> getCompactionState(TableName tableName)
tableName
- table to examineCompletableFuture
CompletableFuture<CompactionState> getCompactionStateForRegion(byte[] regionName)
regionName
- region to examineCompletableFuture
CompletableFuture<Optional<Long>> getLastMajorCompactionTimestamp(TableName tableName)
The timestamp of the oldest HFile resulting from a major compaction of that table, or not present if no such HFile could be found.
tableName
- table to examineCompletableFuture
CompletableFuture<Optional<Long>> getLastMajorCompactionTimestampForRegion(byte[] regionName)
The timestamp of the oldest HFile resulting from a major compaction of that region, or not present if no such HFile could be found.
regionName
- region to examineCompletableFuture
CompletableFuture<List<SecurityCapability>> getSecurityCapabilities()
CompletableFuture
.CompletableFuture<Boolean> setBalancerOn(boolean on)
on
- CompletableFuture
.default CompletableFuture<Boolean> balance()
CompletableFuture
.CompletableFuture<Boolean> balance(boolean forcible)
forcible
- whether we should force balance even if there is region in transition.CompletableFuture
.CompletableFuture<Boolean> isBalancerOn()
CompletableFuture
.CompletableFuture<Boolean> setNormalizerOn(boolean on)
on
- whether normalizer should be on or offCompletableFuture
CompletableFuture<Boolean> isNormalizerOn()
CompletableFuture
CompletableFuture<Boolean> normalize()
CompletableFuture
CompletableFuture<Boolean> setCleanerChoreOn(boolean on)
on
- CompletableFuture
CompletableFuture<Boolean> isCleanerChoreOn()
CompletableFuture
CompletableFuture<Boolean> runCleanerChore()
CompletableFuture
CompletableFuture<Boolean> setCatalogJanitorOn(boolean on)
on
- CompletableFuture
CompletableFuture<Boolean> isCatalogJanitorOn()
CompletableFuture
CompletableFuture<Integer> runCatalogJanitor()
CompletableFuture
<S,R> CompletableFuture<R> coprocessorService(Function<com.google.protobuf.RpcChannel,S> stubMaker, RawAsyncTable.CoprocessorCallable<S,R> callable)
The stubMaker
is just a delegation to the newStub
call. Usually it is only a
one line lambda expression, like:
channel -> xxxService.newStub(channel)
S
- 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.CoprocessorCallable
<S,R> CompletableFuture<R> coprocessorService(Function<com.google.protobuf.RpcChannel,S> stubMaker, RawAsyncTable.CoprocessorCallable<S,R> callable, ServerName serverName)
The stubMaker
is just a delegation to the newStub
call. Usually it is only a
one line lambda expression, like:
channel -> xxxService.newStub(channel)
S
- 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.CoprocessorCallable
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.