@InterfaceAudience.Private 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,
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 pattern)
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 snapshot)
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(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
|
org.apache.hadoop.hbase.client.AsyncConnectionImpl getConnection()
CompletableFuture<Boolean> tableExists(TableName tableName)
tableName
- Table to check.CompletableFuture
.CompletableFuture<TableDescriptor[]> listTables()
CompletableFuture
.listTables(Pattern, boolean)
CompletableFuture<TableDescriptor[]> listTables(String regex, boolean includeSysTables)
regex
- The regular expression to match againstincludeSysTables
- False to match only against userspace tablesCompletableFuture
.listTables(Pattern, boolean)
CompletableFuture<TableDescriptor[]> listTables(Pattern pattern, boolean includeSysTables)
pattern
- The compiled regular expression to match againstincludeSysTables
- False to match only against userspace tablesCompletableFuture
.CompletableFuture<TableName[]> listTableNames()
CompletableFuture
.listTableNames(Pattern, boolean)
CompletableFuture<TableName[]> listTableNames(String regex, boolean includeSysTables)
regex
- The regular expression to match againstincludeSysTables
- False to match only against userspace tablesCompletableFuture
.listTableNames(Pattern, boolean)
CompletableFuture<TableName[]> listTableNames(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
.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, 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<TableDescriptor[]> deleteTables(String regex)
listTables(String, boolean)
and
deleteTable(org.apache.hadoop.hbase.TableName)
regex
- The regular expression to match table names againstCompletableFuture
. The return HTDs are read-only.CompletableFuture<TableDescriptor[]> deleteTables(Pattern pattern)
listTables(Pattern, 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<TableDescriptor[]> enableTables(String regex)
listTables(Pattern, boolean)
and
enableTable(TableName)
regex
- The regular expression to match table names againstCompletableFuture
. The return HTDs are read-only.CompletableFuture<TableDescriptor[]> enableTables(Pattern pattern)
listTables(Pattern, 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<TableDescriptor[]> disableTables(String regex)
listTables(Pattern, boolean)
and
disableTable(TableName)
regex
- The regular expression to match table names againstCompletableFuture
. The return HTDs are read-only.CompletableFuture<TableDescriptor[]> disableTables(Pattern pattern)
listTables(Pattern, boolean)
and
disableTable(TableName)
pattern
- The pattern to match table names againstCompletableFuture
. The return HTDs are read-only.CompletableFuture<Boolean> isTableDisabled(TableName tableName)
tableName
- name of table to checkCompletableFuture
.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, HColumnDescriptor 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, HColumnDescriptor 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<NamespaceDescriptor[]> listNamespaceDescriptors()
CompletableFuture
.CompletableFuture<Boolean> isTableEnabled(TableName tableName)
tableName
- name of table to checkCompletableFuture
.CompletableFuture<Boolean> setBalancerRunning(boolean on)
on
- CompletableFuture
.CompletableFuture<Boolean> balancer()
CompletableFuture
.CompletableFuture<Boolean> balancer(boolean force)
force
- whether we should force balance even if there is region in transition.CompletableFuture
.CompletableFuture<Boolean> isBalancerEnabled()
CompletableFuture
.CompletableFuture<Void> closeRegion(String regionname, String serverName)
regionname
- region name to closeserverName
- If supplied, we'll use this location rather than the one currently in
hbase:meta
CompletableFuture<Void> closeRegion(byte[] regionname, String serverName)
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
CompletableFuture<Boolean> closeRegionWithEncodedRegionName(String encodedRegionName, String serverName)
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
.CompletableFuture<Void> closeRegion(ServerName sn, HRegionInfo hri)
sn
- hri
- CompletableFuture<List<HRegionInfo>> getOnlineRegions(ServerName sn)
CompletableFuture<Void> flush(TableName tableName)
tableName
- table to flushCompletableFuture<Void> flushRegion(byte[] regionName)
regionName
- region to flushCompletableFuture<Void> compact(TableName tableName)
tableName
- table to compactCompletableFuture<Void> compact(TableName tableName, byte[] columnFamily)
tableName
- table to compactcolumnFamily
- column family within a tableCompletableFuture<Void> compactRegion(byte[] regionName)
regionName
- region to compactCompletableFuture<Void> compactRegion(byte[] regionName, byte[] columnFamily)
regionName
- region to compactcolumnFamily
- column family within a regionCompletableFuture<Void> majorCompact(TableName tableName)
tableName
- table to major compactCompletableFuture<Void> majorCompact(TableName tableName, byte[] columnFamily)
tableName
- table to major compactcolumnFamily
- column family within a tableCompletableFuture<Void> majorCompactRegion(byte[] regionName)
regionName
- region to major compactCompletableFuture<Void> majorCompactRegion(byte[] regionName, byte[] columnFamily)
regionName
- egion to major compactcolumnFamily
- column family within a regionCompletableFuture<Void> compactRegionServer(ServerName sn)
sn
- the region server nameCompletableFuture<Void> majorCompactRegionServer(ServerName sn)
sn
- the region server nameCompletableFuture<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 splitCompletableFuture<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, byte[] splitPoint)
regionName
- region to splitsplitPoint
- the explicit position to split onCompletableFuture<Void> assign(byte[] regionName)
regionName
- Encoded or full name of region to assign.CompletableFuture<Void> unassign(byte[] regionName, boolean force)
move(byte[], byte[])
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.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).CompletableFuture<Void> offline(byte[] regionName)
regionName
- Encoded or full name of region to offlineCompletableFuture<Void> move(byte[] regionName, byte[] destServerName)
r
to dest
.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
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 id, Map<TableName,? extends Collection<String>> tableCfs)
id
- a short that identifies the clustertableCfs
- A map from tableName to column family namesCompletableFuture<Void> removeReplicationPeerTableCFs(String id, Map<TableName,? extends Collection<String>> tableCfs)
id
- a short name that identifies the clustertableCfs
- A map from tableName to column family namesCompletableFuture<List<ReplicationPeerDescription>> listReplicationPeers()
CompletableFuture
.CompletableFuture<List<ReplicationPeerDescription>> listReplicationPeers(String regex)
regex
- The regular expression to match peer idCompletableFuture
.CompletableFuture<List<ReplicationPeerDescription>> listReplicationPeers(Pattern pattern)
pattern
- The compiled regular expression to match peer idCompletableFuture
.CompletableFuture<List<TableCFs>> listReplicatedTableCFs()
CompletableFuture
.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 createdCompletableFuture<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 restoredCompletableFuture<List<SnapshotDescription>> listSnapshots()
CompletableFuture
CompletableFuture<List<SnapshotDescription>> listSnapshots(String regex)
regex
- The regular expression to match againstCompletableFuture
CompletableFuture<List<SnapshotDescription>> listSnapshots(Pattern pattern)
pattern
- The compiled regular expression to match againstCompletableFuture
CompletableFuture<List<SnapshotDescription>> listTableSnapshots(String tableNameRegex, String snapshotNameRegex)
tableNameRegex
- The table name regular expression to match againstsnapshotNameRegex
- The snapshot name 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 snapshotCompletableFuture<Void> deleteSnapshots(String regex)
regex
- The regular expression to match againstCompletableFuture<Void> deleteSnapshots(Pattern pattern)
pattern
- pattern for names of the snapshot to matchCompletableFuture<Void> deleteTableSnapshots(String tableNameRegex, String snapshotNameRegex)
tableNameRegex
- The table name regular expression to match againstsnapshotNameRegex
- The snapshot name regular expression to match againstCompletableFuture<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<ProcedureInfo[]> listProcedures()
CompletableFuture
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.