@InterfaceAudience.Private public class HBaseAdmin extends Object implements Admin
Connection.getAdmin() to obtain an instance of Admin instead of constructing
an HBaseAdmin directly.
Connection should be an unmanaged connection obtained via
ConnectionFactory.createConnection(Configuration)
ConnectionFactory,
Connection,
Admin| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
HBaseAdmin.NamespaceFuture |
protected static class |
HBaseAdmin.ProcedureFuture<V>
Future that waits on a procedure result.
|
protected static class |
HBaseAdmin.TableFuture<V> |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
abort(String why,
Throwable e)
Abort the server or client.
|
boolean |
abortProcedure(long procId,
boolean mayInterruptIfRunning)
Abort a procedure.
|
Future<Boolean> |
abortProcedureAsync(long procId,
boolean mayInterruptIfRunning)
Abort a procedure but does not block and wait for completion.
|
void |
addColumnFamily(TableName tableName,
ColumnFamilyDescriptor columnFamily)
Add a column family to an existing table.
|
Future<Void> |
addColumnFamilyAsync(TableName tableName,
ColumnFamilyDescriptor columnFamily)
Add a column family to an existing table.
|
void |
addReplicationPeer(String peerId,
ReplicationPeerConfig peerConfig,
boolean enabled)
Add a new replication peer for replicating data to slave cluster.
|
Future<Void> |
addReplicationPeerAsync(String peerId,
ReplicationPeerConfig peerConfig,
boolean enabled)
Add a new replication peer but does not block and wait for it.
|
void |
appendReplicationPeerTableCFs(String id,
Map<TableName,List<String>> tableCfs)
Append the replicable table column family config from the specified peer.
|
void |
assign(byte[] regionName)
Assign a Region.
|
static void |
available(org.apache.hadoop.conf.Configuration conf)
Is HBase available?
|
boolean |
balance()
Invoke the balancer.
|
boolean |
balance(boolean force)
Invoke the balancer.
|
boolean |
balancerSwitch(boolean on,
boolean synchronous)
Turn the load balancer on or off.
|
boolean |
catalogJanitorSwitch(boolean enable)
Enable/Disable the catalog janitor/
|
boolean |
cleanerChoreSwitch(boolean on)
Enable/Disable the cleaner chore.
|
CacheEvictionStats |
clearBlockCache(TableName tableName)
Clear all the blocks corresponding to this table from BlockCache.
|
void |
clearCompactionQueues(ServerName sn,
Set<String> queues)
Clear compacting queues on a regionserver.
|
List<ServerName> |
clearDeadServers(List<ServerName> servers)
Clear dead region servers from master.
|
void |
cloneSnapshot(byte[] snapshotName,
TableName tableName)
Create a new table by cloning the snapshot content.
|
void |
cloneSnapshot(String snapshotName,
TableName tableName)
Create a new table by cloning the snapshot content.
|
void |
cloneSnapshot(String snapshotName,
TableName tableName,
boolean restoreAcl)
Create a new table by cloning the snapshot content.
|
Future<Void> |
cloneSnapshotAsync(String snapshotName,
TableName tableName)
Create a new table by cloning the snapshot content, but does not block
and wait for it to be completely cloned.
|
void |
cloneTableSchema(TableName tableName,
TableName newTableName,
boolean preserveSplits)
Create a new table by cloning the existent table schema.
|
void |
close() |
void |
closeRegion(byte[] regionName,
String unused)
已过时。
|
void |
closeRegion(ServerName unused,
HRegionInfo hri)
已过时。
|
void |
closeRegion(String regionName,
String unused)
已过时。
|
boolean |
closeRegionWithEncodedRegionName(String encodedRegionName,
String unused)
已过时。
|
void |
compact(TableName tableName)
Compact a table.
|
void |
compact(TableName tableName,
byte[] columnFamily)
Compact a column family within a table.
|
void |
compact(TableName tableName,
byte[] columnFamily,
CompactType compactType)
Compact a column family within a table.
|
void |
compact(TableName tableName,
CompactType compactType)
Compact a table.
|
Map<ServerName,Boolean> |
compactionSwitch(boolean switchState,
List<String> serverNamesList)
Turn the compaction on or off.
|
void |
compactRegion(byte[] regionName)
Compact an individual region.
|
void |
compactRegion(byte[] regionName,
byte[] columnFamily)
Compact a column family within a region.
|
void |
compactRegionServer(ServerName serverName)
Compact all regions on the region server.
|
CoprocessorRpcChannel |
coprocessorService()
Creates and returns a
RpcChannel instance connected to the active
master. |
CoprocessorRpcChannel |
coprocessorService(ServerName serverName)
Creates and returns a
RpcChannel instance
connected to the passed region server. |
void |
createNamespace(NamespaceDescriptor descriptor)
Create a new namespace.
|
Future<Void> |
createNamespaceAsync(NamespaceDescriptor descriptor)
Create a new namespace.
|
void |
createTable(TableDescriptor desc)
Creates a new table.
|
void |
createTable(TableDescriptor desc,
byte[][] splitKeys)
Creates a new table with an initial set of empty regions defined by the specified split keys.
|
void |
createTable(TableDescriptor desc,
byte[] startKey,
byte[] endKey,
int numRegions)
Creates a new table with the specified number of regions.
|
Future<Void> |
createTableAsync(TableDescriptor desc)
Creates a new table but does not block and wait for it to come online.
|
Future<Void> |
createTableAsync(TableDescriptor desc,
byte[][] splitKeys)
Creates a new table but does not block and wait for it to come online.
|
void |
decommissionRegionServers(List<ServerName> servers,
boolean offload)
Mark region server(s) as decommissioned to prevent additional regions from getting
assigned to them.
|
void |
deleteColumn(TableName tableName,
byte[] columnFamily)
已过时。
Since 2.0. Will be removed in 3.0. Use
deleteColumnFamily(TableName, byte[]) instead. |
void |
deleteColumnFamily(TableName tableName,
byte[] columnFamily)
Delete a column family from a table.
|
Future<Void> |
deleteColumnFamilyAsync(TableName tableName,
byte[] columnFamily)
Delete a column family from a table.
|
void |
deleteNamespace(String name)
Delete an existing namespace.
|
Future<Void> |
deleteNamespaceAsync(String name)
Delete an existing namespace.
|
void |
deleteSnapshot(byte[] snapshotName)
Delete an existing snapshot.
|
void |
deleteSnapshot(String snapshotName)
Delete an existing snapshot.
|
void |
deleteSnapshots(Pattern pattern)
Delete existing snapshots whose names match the pattern passed.
|
void |
deleteSnapshots(String regex)
Delete existing snapshots whose names match the pattern passed.
|
void |
deleteTable(TableName tableName)
Deletes a table.
|
Future<Void> |
deleteTableAsync(TableName tableName)
Deletes the table but does not block and wait for it to be completely removed.
|
HTableDescriptor[] |
deleteTables(Pattern pattern)
Delete tables matching the passed in pattern and wait on completion.
|
HTableDescriptor[] |
deleteTables(String regex)
Deletes tables matching the passed in pattern and wait on completion.
|
void |
deleteTableSnapshots(Pattern tableNamePattern,
Pattern snapshotNamePattern)
Delete all existing snapshots matching the given table name regular expression and snapshot
name regular expression.
|
void |
deleteTableSnapshots(String tableNameRegex,
String snapshotNameRegex)
Delete all existing snapshots matching the given table name regular expression and snapshot
name regular expression.
|
void |
disableReplicationPeer(String peerId)
Stop the replication stream to the specified peer.
|
Future<Void> |
disableReplicationPeerAsync(String peerId)
Disable a replication peer but does not block and wait for it.
|
void |
disableTable(TableName tableName)
Disable table and wait on completion.
|
Future<Void> |
disableTableAsync(TableName tableName)
Disable the table but does not block and wait for it to be completely disabled.
|
void |
disableTableReplication(TableName tableName)
Disable a table's replication switch.
|
HTableDescriptor[] |
disableTables(Pattern pattern)
Disable tables matching the passed in pattern and wait on completion.
|
HTableDescriptor[] |
disableTables(String regex)
Disable tables matching the passed in pattern and wait on completion.
|
void |
enableReplicationPeer(String peerId)
Restart the replication stream to the specified peer.
|
Future<Void> |
enableReplicationPeerAsync(String peerId)
Enable a replication peer but does not block and wait for it.
|
void |
enableTable(TableName tableName)
Enable a table.
|
Future<Void> |
enableTableAsync(TableName tableName)
Enable the table but does not block and wait for it to be completely enabled.
|
void |
enableTableReplication(TableName tableName)
Enable a table's replication switch.
|
HTableDescriptor[] |
enableTables(Pattern pattern)
Enable tables matching the passed in pattern and wait on completion.
|
HTableDescriptor[] |
enableTables(String regex)
Enable tables matching the passed in pattern and wait on completion.
|
boolean |
exceedThrottleQuotaSwitch(boolean enable)
Switch the exceed throttle quota.
|
void |
execProcedure(String signature,
String instance,
Map<String,String> props)
Execute a distributed procedure on a cluster.
|
byte[] |
execProcedureWithReturn(String signature,
String instance,
Map<String,String> props)
Execute a distributed procedure on a cluster.
|
void |
flush(TableName tableName)
Flush a table.
|
void |
flushRegion(byte[] regionName)
Flush an individual region.
|
void |
flushRegionServer(ServerName serverName)
Flush all regions on the region server.
|
Pair<Integer,Integer> |
getAlterStatus(byte[] tableName)
Get the status of
alter (a.k.a modify) command - indicates how many
regions have received the updated schema Asynchronous operation. |
Pair<Integer,Integer> |
getAlterStatus(TableName tableName)
Get the status of an
alter (a.k.a modify) command - indicates how
many regions have received the updated schema Asynchronous operation. |
ClusterMetrics |
getClusterMetrics(EnumSet<ClusterMetrics.Option> options)
Get cluster status with a set of
ClusterMetrics.Option to get desired status. |
CompactionState |
getCompactionState(TableName tableName)
Get the current compaction state of a table.
|
CompactionState |
getCompactionState(TableName tableName,
CompactType compactType)
Get the current compaction state of a table.
|
CompactionState |
getCompactionStateForRegion(byte[] regionName)
Get the current compaction state of region.
|
org.apache.hadoop.conf.Configuration |
getConfiguration() |
Connection |
getConnection() |
SpaceQuotaSnapshot |
getCurrentSpaceQuotaSnapshot(String namespace)
Returns the Master's view of a quota on the given
namespace or null if the Master has
no quota information on that namespace. |
SpaceQuotaSnapshot |
getCurrentSpaceQuotaSnapshot(TableName tableName)
Returns the Master's view of a quota on the given
tableName or null if the Master has
no quota information on that table. |
TableDescriptor |
getDescriptor(TableName tableName)
Get a table descriptor.
|
long |
getLastMajorCompactionTimestamp(TableName tableName)
Get the timestamp of the last major compaction for the passed table
The timestamp of the oldest HFile resulting from a major compaction of that table,
or 0 if no such HFile could be found.
|
long |
getLastMajorCompactionTimestampForRegion(byte[] regionName)
Get the timestamp of the last major compaction for the passed region.
|
String |
getLocks()
Get locks.
|
NamespaceDescriptor |
getNamespaceDescriptor(String name)
Get a namespace descriptor by name.
|
List<HRegionInfo> |
getOnlineRegions(ServerName sn)
已过时。
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
getRegions(ServerName). |
int |
getOperationTimeout() |
String |
getProcedures()
Get procedures.
|
List<QuotaSettings> |
getQuota(QuotaFilter filter)
List the quotas based on the filter.
|
QuotaRetriever |
getQuotaRetriever(QuotaFilter filter)
Return a QuotaRetriever to list the quotas based on the filter.
|
List<RegionMetrics> |
getRegionMetrics(ServerName serverName,
TableName tableName)
Get
RegionMetrics of all regions hosted on a regionserver for a table. |
List<RegionInfo> |
getRegions(ServerName sn)
Get all the online regions on a region server.
|
List<RegionInfo> |
getRegions(TableName tableName)
Get the regions of a given table.
|
Map<TableName,SpaceQuotaSnapshot> |
getRegionServerSpaceQuotaSnapshots(ServerName serverName)
Fetches the observed
SpaceQuotaSnapshotViews observed by a RegionServer. |
ReplicationPeerConfig |
getReplicationPeerConfig(String peerId)
Returns the configured ReplicationPeerConfig for the specified peer.
|
List<SecurityCapability> |
getSecurityCapabilities()
Return the set of supported security capabilities.
|
Map<TableName,Long> |
getSpaceQuotaTableSizes()
Fetches the table sizes on the filesystem as tracked by the HBase Master.
|
HTableDescriptor |
getTableDescriptor(TableName tableName)
Get a table descriptor.
|
HTableDescriptor[] |
getTableDescriptors(List<String> names)
Get tableDescriptors.
|
HTableDescriptor[] |
getTableDescriptorsByTableName(List<TableName> tableNames)
Get tableDescriptors.
|
List<HRegionInfo> |
getTableRegions(TableName tableName)
已过时。
As of release 2.0.0, this will be removed in HBase 3.0.0
Use
getRegions(TableName). |
List<UserPermission> |
getUserPermissions(GetUserPermissionsRequest getUserPermissionsRequest)
Get the global/namespace/table permissions for user
|
void |
grant(UserPermission userPermission,
boolean mergeExistingPermissions)
Grants user specific permissions
|
List<Boolean> |
hasUserPermissions(String userName,
List<Permission> permissions)
Check if the user has specific permissions
|
boolean |
isAborted()
Check if the server or client was aborted.
|
boolean |
isBalancerEnabled()
Query the current state of the balancer.
|
boolean |
isCatalogJanitorEnabled()
Query on the catalog janitor state (Enabled/Disabled?).
|
boolean |
isCleanerChoreEnabled()
Query on the cleaner chore state (Enabled/Disabled?).
|
boolean |
isMasterInMaintenanceMode()
Check whether Master is in maintenance mode.
|
boolean |
isMergeEnabled()
Query the current state of the merge switch.
|
boolean |
isNormalizerEnabled()
Query the current state of the region normalizer.
|
boolean |
isProcedureFinished(String signature,
String instance,
Map<String,String> props)
Check the current state of the specified procedure.
|
boolean |
isRpcThrottleEnabled()
Get if the rpc throttle is enabled.
|
boolean |
isSnapshotFinished(SnapshotDescription snapshotDesc)
Check the current state of the passed snapshot.
|
boolean |
isSplitEnabled()
Query the current state of the split switch.
|
boolean |
isTableAvailable(TableName tableName) |
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.
|
boolean |
isTableDisabled(TableName tableName) |
boolean |
isTableEnabled(TableName tableName) |
List<ServerName> |
listDecommissionedRegionServers()
List region servers marked as decommissioned, which can not be assigned regions.
|
NamespaceDescriptor[] |
listNamespaceDescriptors()
List available namespace descriptors.
|
List<TableCFs> |
listReplicatedTableCFs()
Find all table and column families that are replicated from this cluster
|
List<ReplicationPeerDescription> |
listReplicationPeers()
Return a list of replication peers.
|
List<ReplicationPeerDescription> |
listReplicationPeers(Pattern pattern)
Return a list of replication peers.
|
List<SnapshotDescription> |
listSnapshots()
List completed snapshots.
|
List<SnapshotDescription> |
listSnapshots(Pattern pattern)
List all the completed snapshots matching the given pattern.
|
List<SnapshotDescription> |
listSnapshots(String regex)
List all the completed snapshots matching the given regular expression.
|
List<TableDescriptor> |
listTableDescriptors()
List all the userspace tables.
|
List<TableDescriptor> |
listTableDescriptors(List<TableName> tableNames)
Get tableDescriptors.
|
List<TableDescriptor> |
listTableDescriptors(Pattern pattern)
List all the userspace tables that match the given pattern.
|
List<TableDescriptor> |
listTableDescriptors(Pattern pattern,
boolean includeSysTables)
List all the tables matching the given pattern.
|
List<TableDescriptor> |
listTableDescriptorsByNamespace(byte[] name)
Get list of table descriptors by namespace.
|
HTableDescriptor[] |
listTableDescriptorsByNamespace(String name)
Get list of table descriptors by namespace.
|
TableName[] |
listTableNames()
List all of the names of userspace tables.
|
TableName[] |
listTableNames(Pattern pattern)
List all of the names of userspace tables.
|
TableName[] |
listTableNames(Pattern pattern,
boolean includeSysTables)
List all of the names of userspace tables.
|
TableName[] |
listTableNames(String regex)
List all of the names of userspace tables.
|
TableName[] |
listTableNames(String regex,
boolean includeSysTables)
List all of the names of userspace tables.
|
TableName[] |
listTableNamesByNamespace(String name)
Get list of table names by namespace.
|
HTableDescriptor[] |
listTables()
List all the userspace tables.
|
HTableDescriptor[] |
listTables(Pattern pattern)
List all the userspace tables that match the given pattern.
|
HTableDescriptor[] |
listTables(Pattern pattern,
boolean includeSysTables)
List all the tables matching the given pattern.
|
HTableDescriptor[] |
listTables(String regex)
List all the userspace tables matching the given regular expression.
|
HTableDescriptor[] |
listTables(String regex,
boolean includeSysTables)
List all the tables matching the given pattern.
|
List<SnapshotDescription> |
listTableSnapshots(Pattern tableNamePattern,
Pattern snapshotNamePattern)
List all the completed snapshots matching the given table name regular expression and snapshot
name regular expression.
|
List<SnapshotDescription> |
listTableSnapshots(String tableNameRegex,
String snapshotNameRegex)
List all the completed snapshots matching the given table name regular expression and snapshot
name regular expression.
|
void |
majorCompact(TableName tableName)
Major compact a table.
|
void |
majorCompact(TableName tableName,
byte[] columnFamily)
Major compact a column family within a table.
|
void |
majorCompact(TableName tableName,
byte[] columnFamily,
CompactType compactType)
Major compact a column family within a table.
|
void |
majorCompact(TableName tableName,
CompactType compactType)
Major compact a table.
|
void |
majorCompactRegion(byte[] regionName)
Major compact a table or an individual region.
|
void |
majorCompactRegion(byte[] regionName,
byte[] columnFamily)
Major compact a column family within region.
|
void |
majorCompactRegionServer(ServerName serverName)
Major compact all regions on the region server.
|
void |
mergeRegions(byte[] nameOfRegionA,
byte[] nameOfRegionB,
boolean forcible)
已过时。
Since 2.0. Will be removed in 3.0. Use
Admin.mergeRegionsAsync(byte[], byte[], boolean) instead. |
Future<Void> |
mergeRegionsAsync(byte[][] nameofRegionsToMerge,
boolean forcible)
Merge two regions.
|
void |
mergeRegionsSync(byte[] nameOfRegionA,
byte[] nameOfRegionB,
boolean forcible)
Merge two regions.
|
boolean |
mergeSwitch(boolean enabled,
boolean synchronous)
Turn the merge switch on or off.
|
void |
modifyColumnFamily(TableName tableName,
ColumnFamilyDescriptor columnFamily)
Modify an existing column family on a table.
|
Future<Void> |
modifyColumnFamilyAsync(TableName tableName,
ColumnFamilyDescriptor columnFamily)
Modify an existing column family on a table.
|
void |
modifyNamespace(NamespaceDescriptor descriptor)
Modify an existing namespace.
|
Future<Void> |
modifyNamespaceAsync(NamespaceDescriptor descriptor)
Modify an existing namespace.
|
void |
modifyTable(TableDescriptor td)
Modify an existing table, more IRB friendly version.
|
void |
modifyTable(TableName tableName,
TableDescriptor td)
Modify an existing table, more IRB friendly version.
|
Future<Void> |
modifyTableAsync(TableDescriptor td)
Modify an existing table, more IRB (ruby) friendly version.
|
Future<Void> |
modifyTableAsync(TableName tableName,
TableDescriptor td)
Modify an existing table, more IRB friendly version.
|
void |
move(byte[] encodedRegionName)
Move the region
encodedRegionName to a random server. |
void |
move(byte[] encodedRegionName,
ServerName destServerName)
Move the region
rencodedRegionName to destServerName. |
boolean |
normalize()
Invoke region normalizer.
|
boolean |
normalizerSwitch(boolean on)
Turn region normalizer on or off.
|
void |
offline(byte[] regionName)
Offline specified region from master's in-memory state.
|
void |
recommissionRegionServer(ServerName server,
List<byte[]> encodedRegionNames)
Remove decommission marker from a region server to allow regions assignments.
|
void |
removeReplicationPeer(String peerId)
Remove a peer and stop the replication.
|
Future<Void> |
removeReplicationPeerAsync(String peerId)
Remove a replication peer but does not block and wait for it.
|
void |
removeReplicationPeerTableCFs(String id,
Map<TableName,List<String>> tableCfs)
Remove some table-cfs from config of the specified peer.
|
void |
restoreSnapshot(byte[] snapshotName)
Restore the specified snapshot on the original table.
|
void |
restoreSnapshot(byte[] snapshotName,
boolean takeFailSafeSnapshot)
Restore the specified snapshot on the original table.
|
void |
restoreSnapshot(String snapshotName)
Restore the specified snapshot on the original table.
|
void |
restoreSnapshot(String snapshotName,
boolean takeFailSafeSnapshot)
Restore the specified snapshot on the original table.
|
void |
restoreSnapshot(String snapshotName,
boolean takeFailSafeSnapshot,
boolean restoreAcl)
Restore the specified snapshot on the original table.
|
Future<Void> |
restoreSnapshotAsync(String snapshotName)
Restore the specified snapshot on the original table.
|
void |
revoke(UserPermission userPermission)
Revokes user specific permissions
|
byte[][] |
rollHLogWriter(String serverName)
已过时。
|
void |
rollWALWriter(ServerName serverName)
Roll the log writer.
|
int |
runCatalogJanitor()
Ask for a scan of the catalog table.
|
boolean |
runCleanerChore()
Ask for cleaner chore to run.
|
void |
setQuota(QuotaSettings quota)
Apply the new quota settings.
|
void |
shutdown()
Shuts down the HBase cluster.
|
void |
snapshot(byte[] snapshotName,
TableName tableName)
Create a timestamp consistent snapshot for the given table.
|
void |
snapshot(SnapshotDescription snapshotDesc)
Take a snapshot and wait for the server to complete that snapshot (blocking).
|
void |
snapshot(String snapshotName,
TableName tableName)
Take a snapshot for the given table.
|
void |
snapshot(String snapshotName,
TableName tableName,
SnapshotType type)
Create typed snapshot of the table.
|
void |
snapshotAsync(SnapshotDescription snapshotDesc)
Take a snapshot without waiting for the server to complete that snapshot (asynchronous) Only a
single snapshot should be taken at a time, or results may be undefined.
|
void |
split(TableName tableName)
Split a table.
|
void |
split(TableName tableName,
byte[] splitPoint)
Split a table.
|
void |
splitRegion(byte[] regionName)
Split an individual region.
|
void |
splitRegion(byte[] regionName,
byte[] splitPoint)
Split an individual region.
|
Future<Void> |
splitRegionAsync(byte[] regionName)
Split an individual region.
|
Future<Void> |
splitRegionAsync(byte[] regionName,
byte[] splitPoint)
Split an individual region.
|
void |
splitRegionSync(byte[] regionName,
byte[] splitPoint)
Split one region.
|
void |
splitRegionSync(byte[] regionName,
byte[] splitPoint,
long timeout,
TimeUnit units)
Split one region.
|
boolean |
splitSwitch(boolean enabled,
boolean synchronous)
Turn the split switch on or off.
|
void |
stopMaster()
Shuts down the current HBase master only.
|
void |
stopRegionServer(String hostnamePort)
Stop the designated regionserver.
|
boolean |
switchRpcThrottle(boolean enable)
Switch the rpc throttle enable state.
|
boolean |
tableExists(TableName tableName) |
void |
truncateTable(TableName tableName,
boolean preserveSplits)
Truncate a table.
|
Future<Void> |
truncateTableAsync(TableName tableName,
boolean preserveSplits)
Truncate the table but does not block and wait for it to be completely enabled.
|
void |
unassign(byte[] regionName,
boolean force)
Unassign a region from current hosting regionserver.
|
void |
updateConfiguration()
Update the configuration and trigger an online config change
on all the regionservers.
|
void |
updateConfiguration(ServerName server)
Update the configuration and trigger an online config change
on the regionserver.
|
void |
updateReplicationPeerConfig(String peerId,
ReplicationPeerConfig peerConfig)
Update the peerConfig for the specified peer.
|
Future<Void> |
updateReplicationPeerConfigAsync(String peerId,
ReplicationPeerConfig peerConfig)
Update the peerConfig for the specified peer but does not block and wait for it.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddColumn, addReplicationPeer, addReplicationPeerAsync, balancer, balancer, compactRegionServer, enableCatalogJanitor, execProcedureWithRet, getBackupMasters, getClusterMetrics, getClusterStatus, getMaster, getMasterCoprocessorNames, getMasterCoprocessors, getMasterInfoPort, getRegionMetrics, getRegionServers, hasUserPermissions, isSplitOrMergeEnabled, listDeadServers, mergeRegionsAsync, modifyColumn, move, runCatalogScan, setBalancerRunning, setCleanerChoreRunning, setNormalizerRunning, setSplitOrMergeEnabled, takeSnapshotAsyncpublic int getOperationTimeout()
getOperationTimeout 在接口中 Adminpublic boolean isAborted()
Abortablepublic boolean abortProcedure(long procId,
boolean mayInterruptIfRunning)
throws IOException
AdminabortProcedure 在接口中 AdminprocId - ID of the procedure to abortmayInterruptIfRunning - if the proc completed at least one step, should it be aborted?true if aborted, false if procedure already completed or does
not existIOException - if a remote or network exception occurspublic Future<Boolean> abortProcedureAsync(long procId, boolean mayInterruptIfRunning) throws IOException
AdminabortProcedureAsync 在接口中 AdminprocId - ID of the procedure to abortmayInterruptIfRunning - if the proc completed at least one step, should it be aborted?true if aborted, false if procedure already completed or does not existIOException - if a remote or network exception occurspublic List<TableDescriptor> listTableDescriptors() throws IOException
AdminlistTableDescriptors 在接口中 AdminIOException - if a remote or network exception occurspublic List<TableDescriptor> listTableDescriptors(Pattern pattern) throws IOException
AdminlistTableDescriptors 在接口中 Adminpattern - The compiled regular expression to match againstIOException - if a remote or network exception occursAdmin.listTables()public List<TableDescriptor> listTableDescriptors(Pattern pattern, boolean includeSysTables) throws IOException
AdminlistTableDescriptors 在接口中 Adminpattern - The compiled regular expression to match againstincludeSysTables - false to match only against userspace tablesIOException - if a remote or network exception occursAdmin.listTables()public TableDescriptor getDescriptor(TableName tableName) throws TableNotFoundException, IOException
AdmingetDescriptor 在接口中 AdmintableName - as a TableNameTableNotFoundExceptionIOException - if a remote or network exception occurspublic void modifyTable(TableDescriptor td) throws IOException
AdminmodifyTable 在接口中 Admintd - modified description of the tableIOException - if a remote or network exception occurspublic Future<Void> modifyTableAsync(TableDescriptor td) throws IOException
AdminmodifyTableAsync 在接口中 Admintd - description of the tableIOException - if a remote or network exception occurspublic List<TableDescriptor> listTableDescriptorsByNamespace(byte[] name) throws IOException
AdminlistTableDescriptorsByNamespace 在接口中 Adminname - namespace nameIOExceptionpublic List<TableDescriptor> listTableDescriptors(List<TableName> tableNames) throws IOException
AdminlistTableDescriptors 在接口中 AdmintableNames - List of table namesIOException - if a remote or network exception occurspublic List<RegionInfo> getRegions(ServerName sn) throws IOException
AdmingetRegions 在接口中 AdminRegionInfoIOExceptionpublic List<RegionInfo> getRegions(TableName tableName) throws IOException
AdmingetRegions 在接口中 AdmintableName - the name of the tableRegionInfo.IOExceptionpublic Connection getConnection()
getConnection 在接口中 Adminpublic boolean tableExists(TableName tableName) throws IOException
tableExists 在接口中 AdmintableName - Table to check.true if table exists already.IOExceptionpublic HTableDescriptor[] listTables() throws IOException
AdminlistTables 在接口中 AdminIOException - if a remote or network exception occursAdmin.listTableDescriptors()public HTableDescriptor[] listTables(Pattern pattern) throws IOException
AdminlistTables 在接口中 Adminpattern - The compiled regular expression to match againstIOException - if a remote or network exception occursAdmin.listTables(),
Admin.listTableDescriptors(Pattern)public HTableDescriptor[] listTables(String regex) throws IOException
AdminlistTables 在接口中 Adminregex - The regular expression to match againstIOException - if a remote or network exception occursAdmin.listTableDescriptors(Pattern)public HTableDescriptor[] listTables(Pattern pattern, boolean includeSysTables) throws IOException
AdminlistTables 在接口中 Adminpattern - The compiled regular expression to match againstincludeSysTables - false to match only against userspace tablesIOException - if a remote or network exception occursAdmin.listTables(),
Admin.listTableDescriptors(java.util.regex.Pattern, boolean)public HTableDescriptor[] listTables(String regex, boolean includeSysTables) throws IOException
AdminlistTables 在接口中 Adminregex - The regular expression to match againstincludeSysTables - false to match only against userspace tablesIOException - if a remote or network exception occursAdmin.listTables(java.util.regex.Pattern, boolean)public TableName[] listTableNames() throws IOException
AdminlistTableNames 在接口中 AdminIOException - if a remote or network exception occurspublic TableName[] listTableNames(Pattern pattern) throws IOException
AdminlistTableNames 在接口中 Adminpattern - The regular expression to match againstIOException - if a remote or network exception occurspublic TableName[] listTableNames(String regex) throws IOException
AdminlistTableNames 在接口中 Adminregex - The regular expression to match againstIOException - if a remote or network exception occurspublic TableName[] listTableNames(Pattern pattern, boolean includeSysTables) throws IOException
AdminlistTableNames 在接口中 Adminpattern - The regular expression to match againstincludeSysTables - false to match only against userspace tablesIOException - if a remote or network exception occurspublic TableName[] listTableNames(String regex, boolean includeSysTables) throws IOException
AdminlistTableNames 在接口中 Adminregex - The regular expression to match againstincludeSysTables - false to match only against userspace tablesIOException - if a remote or network exception occurspublic HTableDescriptor getTableDescriptor(TableName tableName) throws IOException
AdmingetTableDescriptor 在接口中 AdmintableName - as a TableNameTableNotFoundExceptionIOException - if a remote or network exception occurspublic void createTable(TableDescriptor desc) throws IOException
AdmincreateTable 在接口中 Admindesc - table descriptor for tableMasterNotRunningException - if master is not runningTableExistsException - if table already exists (If concurrent
threads, the table may have been created between test-for-existence and attempt-at-creation).IOException - if a remote or network exception occurspublic void createTable(TableDescriptor desc, byte[] startKey, byte[] endKey, int numRegions) throws IOException
AdmincreateTable 在接口中 Admindesc - table descriptor for tablestartKey - beginning of key rangeendKey - end of key rangenumRegions - the total number of regions to createMasterNotRunningException - if master is not runningTableExistsException - if table already exists (If concurrent
threads, the table may have been created between test-for-existence and attempt-at-creation).IOExceptionpublic void createTable(TableDescriptor desc, byte[][] splitKeys) throws IOException
AdmincreateTable 在接口中 Admindesc - table descriptor for tablesplitKeys - array of split keys for the initial regions of the tableMasterNotRunningException - if master is not runningTableExistsException - if table already exists (If concurrent
threads, the table may have been created between test-for-existence and attempt-at-creation).IOExceptionpublic Future<Void> createTableAsync(TableDescriptor desc, byte[][] splitKeys) throws IOException
AdmincreateTableAsync 在接口中 Admindesc - table descriptor for tablesplitKeys - keys to check if the table has been created with all split keysIOException - if a remote or network exception occurspublic void deleteTable(TableName tableName) throws IOException
AdmindeleteTable 在接口中 AdmintableName - name of table to deleteIOException - if a remote or network exception occurspublic Future<Void> deleteTableAsync(TableName tableName) throws IOException
AdmindeleteTableAsync 在接口中 AdmintableName - name of table to deleteIOException - if a remote or network exception occurspublic HTableDescriptor[] deleteTables(String regex) throws IOException
AdminAdmin.listTableDescriptors(Pattern)
and Admin.deleteTable(org.apache.hadoop.hbase.TableName)deleteTables 在接口中 Adminregex - The regular expression to match table names againstIOExceptionAdmin.deleteTables(java.util.regex.Pattern),
Admin.deleteTable(org.apache.hadoop.hbase.TableName)public HTableDescriptor[] deleteTables(Pattern pattern) throws IOException
listTables(java.util.regex.Pattern) and
deleteTable(TableName)deleteTables 在接口中 Adminpattern - The pattern to match table names againstIOExceptionpublic void truncateTable(TableName tableName, boolean preserveSplits) throws IOException
AdmintruncateTable 在接口中 AdmintableName - name of table to truncatepreserveSplits - true if the splits should be preservedIOException - if a remote or network exception occurspublic Future<Void> truncateTableAsync(TableName tableName, boolean preserveSplits) throws IOException
AdmintruncateTableAsync 在接口中 AdmintableName - name of table to deletepreserveSplits - true if the splits should be preservedIOException - if a remote or network exception occurspublic void enableTable(TableName tableName) throws IOException
AdminAdmin.enableTableAsync(org.apache.hadoop.hbase.TableName)
and Admin.isTableEnabled(org.apache.hadoop.hbase.TableName) instead. The table has to be in
disabled state for it to be enabled.enableTable 在接口中 AdmintableName - name of the tableIOException - if a remote or network exception occurs There could be couple types of
IOException TableNotFoundException means the table doesn't exist. TableNotDisabledException
means the table isn't in disabled state.Admin.isTableEnabled(org.apache.hadoop.hbase.TableName),
Admin.disableTable(org.apache.hadoop.hbase.TableName),
Admin.enableTableAsync(org.apache.hadoop.hbase.TableName)public Future<Void> enableTableAsync(TableName tableName) throws IOException
AdminenableTableAsync 在接口中 AdmintableName - name of table to deleteIOException - if a remote or network exception occurspublic HTableDescriptor[] enableTables(String regex) throws IOException
AdminAdmin.listTableDescriptors(Pattern) and Admin.enableTable(org.apache.hadoop.hbase.TableName)enableTables 在接口中 Adminregex - The regular expression to match table names againstIOExceptionAdmin.enableTables(java.util.regex.Pattern),
Admin.enableTable(org.apache.hadoop.hbase.TableName)public HTableDescriptor[] enableTables(Pattern pattern) throws IOException
AdminAdmin.listTableDescriptors(java.util.regex.Pattern) and
Admin.enableTable(org.apache.hadoop.hbase.TableName)enableTables 在接口中 Adminpattern - The pattern to match table names againstIOExceptionpublic void disableTable(TableName tableName) throws IOException
AdminAdmin.disableTableAsync(org.apache.hadoop.hbase.TableName) and
Admin.isTableDisabled(org.apache.hadoop.hbase.TableName) instead. The table has to be in
enabled state for it to be disabled.disableTable 在接口中 AdminIOException - There could be couple types of IOException TableNotFoundException means the
table doesn't exist. TableNotEnabledException means the table isn't in enabled state.public Future<Void> disableTableAsync(TableName tableName) throws IOException
AdmindisableTableAsync 在接口中 AdmintableName - name of table to deleteIOException - if a remote or network exception occurspublic HTableDescriptor[] disableTables(String regex) throws IOException
AdminAdmin.listTableDescriptors(Pattern) and Admin.disableTable(org.apache.hadoop.hbase.TableName)disableTables 在接口中 Adminregex - The regular expression to match table names againstIOExceptionAdmin.disableTables(java.util.regex.Pattern),
Admin.disableTable(org.apache.hadoop.hbase.TableName)public HTableDescriptor[] disableTables(Pattern pattern) throws IOException
AdminAdmin.listTableDescriptors(java.util.regex.Pattern) and
Admin.disableTable(org.apache.hadoop.hbase.TableName)disableTables 在接口中 Adminpattern - The pattern to match table names againstIOExceptionpublic boolean isTableEnabled(TableName tableName) throws IOException
isTableEnabled 在接口中 AdmintableName - name of table to checktrue if table is on-lineIOException - if a remote or network exception occurspublic boolean isTableDisabled(TableName tableName) throws IOException
isTableDisabled 在接口中 AdmintableName - name of table to checktrue if table is off-lineIOException - if a remote or network exception occurspublic boolean isTableAvailable(TableName tableName) throws IOException
isTableAvailable 在接口中 AdmintableName - name of table to checktrue if all regions of the table are availableIOException - if a remote or network exception occurspublic boolean isTableAvailable(TableName tableName, byte[][] splitKeys) throws IOException
Adminfalse.isTableAvailable 在接口中 AdmintableName - name of table to checksplitKeys - keys to check if the table has been created with all split keysIOException - if a remote or network excpetion occurspublic Pair<Integer,Integer> getAlterStatus(TableName tableName) throws IOException
Adminalter (a.k.a modify) command - indicates how
many regions have received the updated schema Asynchronous operation.getAlterStatus 在接口中 AdmintableName - TableName instanceIOException - if a remote or network exception occurspublic Pair<Integer,Integer> getAlterStatus(byte[] tableName) throws IOException
Adminalter (a.k.a modify) command - indicates how many
regions have received the updated schema Asynchronous operation.getAlterStatus 在接口中 AdmintableName - name of the table to get the status ofIOException - if a remote or network exception occurspublic void addColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamily) throws IOException
AdminAdmin.addColumnFamilyAsync(TableName, ColumnFamilyDescriptor) instead because it
returns a Future from which you can learn whether success or failure.addColumnFamily 在接口中 AdmintableName - name of the table to add column family tocolumnFamily - column family descriptor of column family to be addedIOException - if a remote or network exception occurspublic Future<Void> addColumnFamilyAsync(TableName tableName, ColumnFamilyDescriptor columnFamily) throws IOException
AdminaddColumnFamilyAsync 在接口中 AdmintableName - name of the table to add column family tocolumnFamily - column family descriptor of column family to be addedIOException - if a remote or network exception occurs@Deprecated public void deleteColumn(TableName tableName, byte[] columnFamily) throws IOException
deleteColumnFamily(TableName, byte[]) instead.Admin.deleteColumnFamily(TableName, byte[]) instead because it
returns a Future from which you can learn whether success or failure.deleteColumn 在接口中 AdmintableName - name of tablecolumnFamily - name of column family to be deletedIOException - if a remote or network exception occurspublic void deleteColumnFamily(TableName tableName, byte[] columnFamily) throws IOException
AdminAdmin.deleteColumnFamily(TableName, byte[]) instead because it
returns a Future from which you can learn whether success or failure.deleteColumnFamily 在接口中 AdmintableName - name of tablecolumnFamily - name of column family to be deletedIOException - if a remote or network exception occurspublic Future<Void> deleteColumnFamilyAsync(TableName tableName, byte[] columnFamily) throws IOException
AdmindeleteColumnFamilyAsync 在接口中 AdmintableName - name of tablecolumnFamily - name of column family to be deletedIOException - if a remote or network exception occurspublic void modifyColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamily) throws IOException
AdminAdmin.modifyColumnFamilyAsync(TableName, ColumnFamilyDescriptor) instead because it
returns a Future from which you can learn whether success or failure.modifyColumnFamily 在接口中 AdmintableName - name of tablecolumnFamily - new column family descriptor to useIOException - if a remote or network exception occurspublic Future<Void> modifyColumnFamilyAsync(TableName tableName, ColumnFamilyDescriptor columnFamily) throws IOException
AdminmodifyColumnFamilyAsync 在接口中 AdmintableName - name of tablecolumnFamily - new column family descriptor to useIOException - if a remote or network exception occurs@Deprecated public void closeRegion(String regionName, String unused) throws IOException
AdminAdmin.unassign(byte[], boolean) to unassign the region. For expert-admins.closeRegion 在接口中 AdminregionName - region name to closeunused - Deprecated. Not used.IOException - if a remote or network exception occurs@Deprecated public void closeRegion(byte[] regionName, String unused) throws IOException
AdminAdmin.unassign(byte[], boolean) to unassign the region. For expert-admins.closeRegion 在接口中 AdminregionName - region name to closeunused - Deprecated. Not used.IOException - if a remote or network exception occurs@Deprecated public boolean closeRegionWithEncodedRegionName(String encodedRegionName, String unused) throws IOException
AdminAdmin.unassign(byte[], boolean) to unassign the region. For expert-admins.closeRegionWithEncodedRegionName 在接口中 AdminencodedRegionName - 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.unused - Deprecated. Not used.true always.IOException - if a remote or network exception occurs@Deprecated public void closeRegion(ServerName unused, HRegionInfo hri) throws IOException
AdminAdmin.unassign(byte[], boolean) to unassign the region. For expert-admins.closeRegion 在接口中 Adminunused - Deprecated. Not used.IOException@Deprecated public List<HRegionInfo> getOnlineRegions(ServerName sn) throws IOException
getRegions(ServerName).AdmingetOnlineRegions 在接口中 Adminsn - HRegionInfo.IOExceptionpublic void flush(TableName tableName) throws IOException
Adminflush 在接口中 AdmintableName - table to flushIOException - if a remote or network exception occurspublic void flushRegion(byte[] regionName)
throws IOException
AdminflushRegion 在接口中 AdminregionName - region to flushIOException - if a remote or network exception occurspublic void flushRegionServer(ServerName serverName) throws IOException
AdminflushRegionServer 在接口中 AdminserverName - the region server name to flushIOException - if a remote or network exception occurspublic void compact(TableName tableName) throws IOException
compact 在接口中 AdmintableName - table to compactIOException - if a remote or network exception occurspublic void compactRegion(byte[] regionName)
throws IOException
AdmincompactRegion 在接口中 AdminregionName - region to compactIOException - if a remote or network exception occurspublic void compact(TableName tableName, byte[] columnFamily) throws IOException
compact 在接口中 AdmintableName - table to compactcolumnFamily - column family within a tableIOException - if a remote or network exception occurspublic void compactRegion(byte[] regionName,
byte[] columnFamily)
throws IOException
compactRegion 在接口中 AdminregionName - region to compactcolumnFamily - column family within a regionIOException - if a remote or network exception occurspublic Map<ServerName,Boolean> compactionSwitch(boolean switchState, List<String> serverNamesList) throws IOException
AdmincompactionSwitch 在接口中 AdminswitchState - Set to true to enable, false to disable.serverNamesList - list of region servers.IOExceptionpublic void compactRegionServer(ServerName serverName) throws IOException
AdmincompactRegionServer 在接口中 AdminserverName - the region server nameIOException - if a remote or network exception occurspublic void majorCompactRegionServer(ServerName serverName) throws IOException
AdminmajorCompactRegionServer 在接口中 AdminserverName - the region server nameIOException - if a remote or network exception occurspublic void majorCompact(TableName tableName) throws IOException
AdminmajorCompact 在接口中 AdmintableName - table to major compactIOException - if a remote or network exception occurspublic void majorCompactRegion(byte[] regionName)
throws IOException
AdminmajorCompactRegion 在接口中 AdminregionName - region to major compactIOException - if a remote or network exception occurspublic void majorCompact(TableName tableName, byte[] columnFamily) throws IOException
majorCompact 在接口中 AdmintableName - table to major compactcolumnFamily - column family within a tableIOException - if a remote or network exception occurspublic void majorCompactRegion(byte[] regionName,
byte[] columnFamily)
throws IOException
AdminmajorCompactRegion 在接口中 AdminregionName - egion to major compactcolumnFamily - column family within a regionIOException - if a remote or network exception occurspublic void move(byte[] encodedRegionName)
throws IOException
AdminencodedRegionName to a random server.move 在接口中 AdminencodedRegionName - 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.IOException - if we can't find a region named encodedRegionNamepublic void move(byte[] encodedRegionName,
ServerName destServerName)
throws IOException
AdminrencodedRegionName to destServerName.move 在接口中 AdminencodedRegionName - 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.destServerName - The servername of the destination regionserver. A server name is made of
host, port and startcode. Here is an example:
host187.example.com,60020,1289493121758IOException - if we can't find a region named encodedRegionNamepublic void assign(byte[] regionName)
throws MasterNotRunningException,
ZooKeeperConnectionException,
IOException
Adminassign 在接口中 AdminregionName - Region name to assign.MasterNotRunningExceptionZooKeeperConnectionExceptionIOExceptionpublic void unassign(byte[] regionName,
boolean force)
throws IOException
AdminAdmin.move(byte[], ServerName) if you want to control the region movement.unassign 在接口中 AdminregionName - 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).IOExceptionpublic void offline(byte[] regionName)
throws IOException
Adminoffline 在接口中 AdminregionName - Region to offline.IOExceptionpublic boolean balancerSwitch(boolean on,
boolean synchronous)
throws IOException
AdminbalancerSwitch 在接口中 Adminon - Set to true to enable, false to disable.synchronous - If true, it waits until current balance() call, if
outstanding, to return.IOExceptionpublic boolean balance()
throws IOException
Adminbalance 在接口中 Admintrue if balancer ran, false otherwise.IOExceptionpublic boolean balance(boolean force)
throws IOException
Adminbalance 在接口中 Adminforce - whether we should force balance even if there is region in transitiontrue if balancer ran, false otherwise.IOExceptionpublic boolean isBalancerEnabled()
throws IOException
AdminisBalancerEnabled 在接口中 Admintrue if the balancer is enabled, false otherwise.IOExceptionpublic CacheEvictionStats clearBlockCache(TableName tableName) throws IOException
clearBlockCache 在接口中 AdmintableName - table to clear block cacheIOException - if a remote or network exception occurspublic boolean normalize()
throws IOException
normalize 在接口中 AdminIOExceptionpublic boolean isNormalizerEnabled()
throws IOException
AdminisNormalizerEnabled 在接口中 Admintrue if region normalizer is enabled, false otherwise.IOExceptionpublic boolean normalizerSwitch(boolean on)
throws IOException
AdminnormalizerSwitch 在接口中 AdminIOExceptionpublic boolean catalogJanitorSwitch(boolean enable)
throws IOException
AdmincatalogJanitorSwitch 在接口中 Adminenable - if true enables the catalog janitorIOExceptionpublic int runCatalogJanitor()
throws IOException
AdminrunCatalogJanitor 在接口中 AdminIOExceptionpublic boolean isCatalogJanitorEnabled()
throws IOException
AdminisCatalogJanitorEnabled 在接口中 AdminIOExceptionpublic boolean cleanerChoreSwitch(boolean on)
throws IOException
AdmincleanerChoreSwitch 在接口中 Adminon - if true enables the cleaner choreIOExceptionpublic boolean runCleanerChore()
throws IOException
AdminrunCleanerChore 在接口中 Admintrue if cleaner chore ran, false otherwiseIOExceptionpublic boolean isCleanerChoreEnabled()
throws IOException
AdminisCleanerChoreEnabled 在接口中 AdminIOExceptionpublic void mergeRegionsSync(byte[] nameOfRegionA,
byte[] nameOfRegionB,
boolean forcible)
throws IOException
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 regionsIOException@Deprecated public void mergeRegions(byte[] nameOfRegionA, byte[] nameOfRegionB, boolean forcible) throws IOException
Admin.mergeRegionsAsync(byte[], byte[], boolean) instead.mergeRegions 在接口中 AdminnameOfRegionA - 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 regionsIOExceptionpublic Future<Void> mergeRegionsAsync(byte[][] nameofRegionsToMerge, boolean forcible) throws IOException
mergeRegionsAsync 在接口中 AdminnameofRegionsToMerge - encoded or full name of daughter regionsforcible - true if do a compulsory merge, otherwise we will only merge
adjacent regionsIOExceptionpublic void splitRegionSync(byte[] regionName,
byte[] splitPoint)
throws IOException
regionName - encoded or full name of regionsplitPoint - key where region splitsIOExceptionpublic void splitRegionSync(byte[] regionName,
byte[] splitPoint,
long timeout,
TimeUnit units)
throws IOException
regionName - region to be splitsplitPoint - split pointtimeout - how long to wait on splitunits - time unitsIOExceptionpublic Future<Void> splitRegionAsync(byte[] regionName, byte[] splitPoint) throws IOException
AdminsplitRegionAsync 在接口中 AdminregionName - region to splitsplitPoint - the explicit position to split onIOException - if a remote or network exception occurspublic void split(TableName tableName) throws IOException
Adminsplit 在接口中 AdmintableName - table to splitIOException - if a remote or network exception occurspublic void splitRegion(byte[] regionName)
throws IOException
AdminsplitRegion 在接口中 AdminregionName - region to splitIOException - if a remote or network exception occurspublic void split(TableName tableName, byte[] splitPoint) throws IOException
Adminsplit 在接口中 AdmintableName - table to splitsplitPoint - the explicit position to split onIOException - if a remote or network exception occurspublic void splitRegion(byte[] regionName,
byte[] splitPoint)
throws IOException
AdminsplitRegion 在接口中 AdminregionName - region to splitsplitPoint - the explicit position to split onIOException - if a remote or network exception occurspublic void modifyTable(TableName tableName, TableDescriptor td) throws IOException
AdminmodifyTable 在接口中 AdmintableName - name of table.td - modified description of the tableIOException - if a remote or network exception occurspublic Future<Void> modifyTableAsync(TableName tableName, TableDescriptor td) throws IOException
AdminmodifyTableAsync 在接口中 AdmintableName - name of table.td - modified description of the tableIOException - if a remote or network exception occurspublic void shutdown()
throws IOException
AdminShuts down the HBase cluster.
Notice that, a success shutdown call may ends with an error since the remote server has already been shutdown.
shutdown 在接口中 AdminIOException - if a remote or network exception occurspublic void stopMaster()
throws IOException
AdminShuts down the current HBase master only. Does not shutdown the cluster.
Notice that, a success stopMaster call may ends with an error since the remote server has already been shutdown.
stopMaster 在接口中 AdminIOException - if a remote or network exception occursAdmin.shutdown()public void stopRegionServer(String hostnamePort) throws IOException
AdminstopRegionServer 在接口中 AdminhostnamePort - Hostname and port delimited by a : as in
example.org:1234IOException - if a remote or network exception occurspublic boolean isMasterInMaintenanceMode()
throws IOException
AdminisMasterInMaintenanceMode 在接口中 AdminIOException - if a remote or network exception occurspublic ClusterMetrics getClusterMetrics(EnumSet<ClusterMetrics.Option> options) throws IOException
AdminClusterMetrics.Option to get desired status.getClusterMetrics 在接口中 AdminIOException - if a remote or network exception occurspublic List<RegionMetrics> getRegionMetrics(ServerName serverName, TableName tableName) throws IOException
AdminRegionMetrics of all regions hosted on a regionserver for a table.getRegionMetrics 在接口中 AdminserverName - region server from which RegionMetrics is required.tableName - get RegionMetrics of regions belonging to the tableIOException - if a remote or network exception occurspublic org.apache.hadoop.conf.Configuration getConfiguration()
getConfiguration 在接口中 Adminpublic void createNamespace(NamespaceDescriptor descriptor) throws IOException
AdmincreateNamespace 在接口中 Admindescriptor - descriptor which describes the new namespace.IOExceptionpublic Future<Void> createNamespaceAsync(NamespaceDescriptor descriptor) throws IOException
AdmincreateNamespaceAsync 在接口中 Admindescriptor - descriptor which describes the new namespaceIOExceptionpublic void modifyNamespace(NamespaceDescriptor descriptor) throws IOException
AdminmodifyNamespace 在接口中 Admindescriptor - descriptor which describes the new namespaceIOExceptionpublic Future<Void> modifyNamespaceAsync(NamespaceDescriptor descriptor) throws IOException
AdminmodifyNamespaceAsync 在接口中 Admindescriptor - descriptor which describes the new namespaceIOExceptionpublic void deleteNamespace(String name) throws IOException
AdmindeleteNamespace 在接口中 Adminname - namespace nameIOExceptionpublic Future<Void> deleteNamespaceAsync(String name) throws IOException
AdmindeleteNamespaceAsync 在接口中 Adminname - namespace nameIOExceptionpublic NamespaceDescriptor getNamespaceDescriptor(String name) throws NamespaceNotFoundException, IOException
AdmingetNamespaceDescriptor 在接口中 Adminname - name of namespace descriptorNamespaceNotFoundExceptionIOException - if a remote or network exception occurspublic NamespaceDescriptor[] listNamespaceDescriptors() throws IOException
AdminlistNamespaceDescriptors 在接口中 AdminIOExceptionpublic String getProcedures() throws IOException
AdmingetProcedures 在接口中 AdminIOExceptionpublic String getLocks() throws IOException
AdmingetLocks 在接口中 AdminIOException - if a remote or network exception occurspublic HTableDescriptor[] listTableDescriptorsByNamespace(String name) throws IOException
AdminlistTableDescriptorsByNamespace 在接口中 Adminname - namespace nameIOExceptionpublic TableName[] listTableNamesByNamespace(String name) throws IOException
AdminlistTableNamesByNamespace 在接口中 Adminname - namespace nameIOExceptionpublic static void available(org.apache.hadoop.conf.Configuration conf)
throws MasterNotRunningException,
ZooKeeperConnectionException,
IOException
conf - system configurationMasterNotRunningException - if the master is not running.ZooKeeperConnectionException - if unable to connect to zookeeper. // TODO do not expose
ZKConnectionException.IOException@Deprecated public List<HRegionInfo> getTableRegions(TableName tableName) throws IOException
getRegions(TableName).AdmingetTableRegions 在接口中 AdmintableName - HRegionInfo.IOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在接口中 AdminIOExceptionpublic HTableDescriptor[] getTableDescriptorsByTableName(List<TableName> tableNames) throws IOException
AdmingetTableDescriptorsByTableName 在接口中 AdmintableNames - List of table namesIOException - if a remote or network exception occurspublic HTableDescriptor[] getTableDescriptors(List<String> names) throws IOException
AdmingetTableDescriptors 在接口中 Adminnames - List of table namesIOException - if a remote or network exception occurs@Deprecated public byte[][] rollHLogWriter(String serverName) throws IOException, FailedLogCloseException
rollWALWriter(ServerName)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,1289493121758HRegionInfo.getEncodedName() that would allow the wal to
clean up some underlying files. null if there's nothing to flush.IOException - if a remote or network exception occursFailedLogCloseExceptionpublic void rollWALWriter(ServerName serverName) throws IOException, FailedLogCloseException
AdminrollWALWriter 在接口中 AdminserverName - The servername of the regionserver.IOException - if a remote or network exception occursFailedLogCloseExceptionpublic CompactionState getCompactionState(TableName tableName) throws IOException
AdmingetCompactionState 在接口中 AdmintableName - table to examineIOException - if a remote or network exception occurspublic CompactionState getCompactionStateForRegion(byte[] regionName) throws IOException
AdmingetCompactionStateForRegion 在接口中 AdminregionName - region to examineIOException - if a remote or network exception occurspublic void snapshot(String snapshotName, TableName tableName) throws IOException, SnapshotCreationException, IllegalArgumentException
AdminSnapshotCreationException indicating the duplicate naming.
Snapshot names follow the same naming constraints as tables in HBase. See TableName.isLegalFullyQualifiedTableName(byte[]).snapshot 在接口中 AdminsnapshotName - name of the snapshot to be createdtableName - name of the table for which snapshot is createdIOException - if a remote or network exception occursSnapshotCreationException - if snapshot creation failedIllegalArgumentException - if the snapshot request is formatted incorrectlypublic void snapshot(byte[] snapshotName,
TableName tableName)
throws IOException,
SnapshotCreationException,
IllegalArgumentException
AdminSnapshotCreationException
indicating the duplicate naming. Snapshot names follow the same naming constraints as tables in
HBase.snapshot 在接口中 AdminsnapshotName - name of the snapshot to be createdtableName - name of the table for which snapshot is createdIOException - if a remote or network exception occursSnapshotCreationException - if snapshot creation failedIllegalArgumentException - if the snapshot request is formatted incorrectlypublic void snapshot(String snapshotName, TableName tableName, SnapshotType type) throws IOException, SnapshotCreationException, IllegalArgumentException
AdminSnapshotCreationException indicating the
duplicate naming. Snapshot names follow the same naming constraints as tables in HBase. See
TableName.isLegalFullyQualifiedTableName(byte[]).snapshot 在接口中 AdminsnapshotName - 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 takeIOException - we fail to reach the masterSnapshotCreationException - if snapshot creation failedIllegalArgumentException - if the snapshot request is formatted incorrectlypublic void snapshot(SnapshotDescription snapshotDesc) throws IOException, SnapshotCreationException, IllegalArgumentException
AdminSnapshotCreationException indicating the duplicate naming.
Snapshot names follow the same naming constraints as tables in HBase. See TableName.isLegalFullyQualifiedTableName(byte[]). You should probably
use Admin.snapshot(String, org.apache.hadoop.hbase.TableName) or
Admin.snapshot(byte[], org.apache.hadoop.hbase.TableName) unless you are sure about the type
of snapshot that you want to take.snapshot 在接口中 AdminsnapshotDesc - snapshot to takeIOException - or we lose contact with the master.SnapshotCreationException - if snapshot failed to be takenIllegalArgumentException - if the snapshot request is formatted incorrectlypublic void snapshotAsync(SnapshotDescription snapshotDesc) throws IOException, SnapshotCreationException
AdminsnapshotAsync 在接口中 AdminsnapshotDesc - snapshot to takeIOException - if the snapshot did not succeed or we lose contact with the master.SnapshotCreationException - if snapshot creation failedpublic boolean isSnapshotFinished(SnapshotDescription snapshotDesc) throws IOException, HBaseSnapshotException, UnknownSnapshotException
AdminUnknownSnapshotException.isSnapshotFinished 在接口中 AdminsnapshotDesc - description of the snapshot to checkIOException - if we have a network issueHBaseSnapshotException - if the snapshot failedUnknownSnapshotException - if the requested snapshot is
unknownpublic void restoreSnapshot(byte[] snapshotName)
throws IOException,
RestoreSnapshotException
Admintrue, a
snapshot of the current table is taken before executing the restore operation. In case of
restore failure, the failsafe snapshot will be restored. If the restore completes without
problem the failsafe snapshot is deleted.restoreSnapshot 在接口中 AdminsnapshotName - name of the snapshot to restoreIOException - if a remote or network exception occursRestoreSnapshotException - if snapshot failed to be
restoredpublic void restoreSnapshot(String snapshotName) throws IOException, RestoreSnapshotException
Admintrue, a
snapshot of the current table is taken before executing the restore operation. In case of
restore failure, the failsafe snapshot will be restored. If the restore completes without
problem the failsafe snapshot is deleted.restoreSnapshot 在接口中 AdminsnapshotName - name of the snapshot to restoreIOException - if a remote or network exception occursRestoreSnapshotException - if snapshot failed to be restoredpublic void restoreSnapshot(byte[] snapshotName,
boolean takeFailSafeSnapshot)
throws IOException,
RestoreSnapshotException
Admintrue, a snapshot of the current table is taken before
executing the restore operation. In case of restore failure, the failsafe snapshot will be
restored. If the restore completes without problem the failsafe snapshot is deleted. The
failsafe snapshot name is configurable by using the property
"hbase.snapshot.restore.failsafe.name".restoreSnapshot 在接口中 AdminsnapshotName - name of the snapshot to restoretakeFailSafeSnapshot - true if the failsafe snapshot should be takenIOException - if a remote or network exception occursRestoreSnapshotException - if snapshot failed to be restoredpublic void restoreSnapshot(String snapshotName, boolean takeFailSafeSnapshot) throws IOException, RestoreSnapshotException
Admintrue, a snapshot of the current table is taken before
executing the restore operation. In case of restore failure, the failsafe snapshot will be
restored. If the restore completes without problem the failsafe snapshot is deleted. The
failsafe snapshot name is configurable by using the property
"hbase.snapshot.restore.failsafe.name".restoreSnapshot 在接口中 AdminsnapshotName - name of the snapshot to restoretakeFailSafeSnapshot - true if the failsafe snapshot should be takenIOException - if a remote or network exception occursRestoreSnapshotException - if snapshot failed to be restoredpublic void restoreSnapshot(String snapshotName, boolean takeFailSafeSnapshot, boolean restoreAcl) throws IOException, RestoreSnapshotException
Admintrue, a snapshot of the current table is taken before
executing the restore operation. In case of restore failure, the failsafe snapshot will be
restored. If the restore completes without problem the failsafe snapshot is deleted. The
failsafe snapshot name is configurable by using the property
"hbase.snapshot.restore.failsafe.name".restoreSnapshot 在接口中 AdminsnapshotName - name of the snapshot to restoretakeFailSafeSnapshot - true if the failsafe snapshot should be takenrestoreAcl - true to restore acl of snapshotIOException - if a remote or network exception occursRestoreSnapshotException - if snapshot failed to be restoredpublic Future<Void> restoreSnapshotAsync(String snapshotName) throws IOException, RestoreSnapshotException
Admintrue, a
snapshot of the current table is taken before executing the restore operation. In case of
restore failure, the failsafe snapshot will be restored. If the restore completes without
problem the failsafe snapshot is deleted.restoreSnapshotAsync 在接口中 AdminsnapshotName - name of the snapshot to restoreIOException - if a remote or network exception occursRestoreSnapshotException - if snapshot failed to be restoredpublic void cloneSnapshot(byte[] snapshotName,
TableName tableName)
throws IOException,
TableExistsException,
RestoreSnapshotException
AdmincloneSnapshot 在接口中 AdminsnapshotName - name of the snapshot to be clonedtableName - name of the table where the snapshot will be restoredIOException - if a remote or network exception occursTableExistsException - if table to be created already existsRestoreSnapshotException - if snapshot failed to be clonedpublic void cloneSnapshot(String snapshotName, TableName tableName, boolean restoreAcl) throws IOException, TableExistsException, RestoreSnapshotException
AdmincloneSnapshot 在接口中 AdminsnapshotName - name of the snapshot to be clonedtableName - name of the table where the snapshot will be restoredrestoreAcl - true to clone acl into newly created tableIOException - if a remote or network exception occursTableExistsException - if table to be created already existsRestoreSnapshotException - if snapshot failed to be clonedpublic void cloneSnapshot(String snapshotName, TableName tableName) throws IOException, TableExistsException, RestoreSnapshotException
AdmincloneSnapshot 在接口中 AdminsnapshotName - name of the snapshot to be clonedtableName - name of the table where the snapshot will be restoredIOException - if a remote or network exception occursTableExistsException - if table to be created already existsRestoreSnapshotException - if snapshot failed to be clonedpublic Future<Void> cloneSnapshotAsync(String snapshotName, TableName tableName) throws IOException, TableExistsException
AdmincloneSnapshotAsync 在接口中 AdminsnapshotName - name of the snapshot to be clonedtableName - name of the table where the snapshot will be restoredIOException - if a remote or network exception occursTableExistsException - if table to be cloned already existspublic byte[] execProcedureWithReturn(String signature, String instance, Map<String,String> props) throws IOException
AdminexecProcedureWithReturn 在接口中 Adminsignature - 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 procedureIOExceptionpublic void execProcedure(String signature, String instance, Map<String,String> props) throws IOException
AdminexecProcedure 在接口中 Adminsignature - 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 procedureIOExceptionpublic boolean isProcedureFinished(String signature, String instance, Map<String,String> props) throws IOException
AdminisProcedureFinished 在接口中 Adminsignature - The signature that uniquely identifies a procedureinstance - The instance name of the procedureprops - Property/Value pairs of properties passing to the proceduretrue if the specified procedure is finished successfully, false if it is still runningIOException - if the specified procedure finished with errorpublic List<SnapshotDescription> listSnapshots() throws IOException
AdminlistSnapshots 在接口中 AdminIOException - if a network error occurspublic List<SnapshotDescription> listSnapshots(String regex) throws IOException
AdminlistSnapshots 在接口中 Adminregex - The regular expression to match againstIOException - if a remote or network exception occurspublic List<SnapshotDescription> listSnapshots(Pattern pattern) throws IOException
AdminlistSnapshots 在接口中 Adminpattern - The compiled regular expression to match againstIOException - if a remote or network exception occurspublic List<SnapshotDescription> listTableSnapshots(String tableNameRegex, String snapshotNameRegex) throws IOException
AdminlistTableSnapshots 在接口中 AdmintableNameRegex - The table name regular expression to match againstsnapshotNameRegex - The snapshot name regular expression to match againstIOException - if a remote or network exception occurspublic List<SnapshotDescription> listTableSnapshots(Pattern tableNamePattern, Pattern snapshotNamePattern) throws IOException
AdminlistTableSnapshots 在接口中 AdmintableNamePattern - The compiled table name regular expression to match againstsnapshotNamePattern - The compiled snapshot name regular expression to match againstIOException - if a remote or network exception occurspublic void deleteSnapshot(byte[] snapshotName)
throws IOException
AdmindeleteSnapshot 在接口中 AdminsnapshotName - name of the snapshotIOException - if a remote or network exception occurspublic void deleteSnapshot(String snapshotName) throws IOException
AdmindeleteSnapshot 在接口中 AdminsnapshotName - name of the snapshotIOException - if a remote or network exception occurspublic void deleteSnapshots(String regex) throws IOException
AdmindeleteSnapshots 在接口中 Adminregex - The regular expression to match againstIOException - if a remote or network exception occurspublic void deleteSnapshots(Pattern pattern) throws IOException
AdmindeleteSnapshots 在接口中 Adminpattern - pattern for names of the snapshot to matchIOException - if a remote or network exception occurspublic void deleteTableSnapshots(String tableNameRegex, String snapshotNameRegex) throws IOException
AdmindeleteTableSnapshots 在接口中 AdmintableNameRegex - The table name regular expression to match againstsnapshotNameRegex - The snapshot name regular expression to match againstIOException - if a remote or network exception occurspublic void deleteTableSnapshots(Pattern tableNamePattern, Pattern snapshotNamePattern) throws IOException
AdmindeleteTableSnapshots 在接口中 AdmintableNamePattern - The compiled table name regular expression to match againstsnapshotNamePattern - The compiled snapshot name regular expression to match againstIOException - if a remote or network exception occurspublic void setQuota(QuotaSettings quota) throws IOException
AdminsetQuota 在接口中 Adminquota - the quota settingsIOException - if a remote or network exception occurspublic QuotaRetriever getQuotaRetriever(QuotaFilter filter) throws IOException
AdmingetQuotaRetriever 在接口中 Adminfilter - the quota settings filterIOException - if a remote or network exception occurspublic List<QuotaSettings> getQuota(QuotaFilter filter) throws IOException
AdmingetQuota 在接口中 Adminfilter - the quota settings filterIOException - if a remote or network exception occurspublic CoprocessorRpcChannel coprocessorService()
AdminRpcChannel instance connected to the active
master. The obtained RpcChannel instance can be used to access
a published coprocessor Service using standard protobuf service
invocations:
CoprocessorRpcChannel channel = myAdmin.coprocessorService();
MyService.BlockingInterface service = MyService.newBlockingStub(channel);
MyCallRequest request = MyCallRequest.newBuilder()
...
.build();
MyCallResponse response = service.myCall(null, request);
coprocessorService 在接口中 Adminpublic CoprocessorRpcChannel coprocessorService(ServerName serverName)
AdminRpcChannel instance
connected to the passed region server.
The obtained RpcChannel instance can be used to access a published
coprocessor Service using standard protobuf service invocations:
CoprocessorRpcChannel channel = myAdmin.coprocessorService(serverName);
MyService.BlockingInterface service = MyService.newBlockingStub(channel);
MyCallRequest request = MyCallRequest.newBuilder()
...
.build();
MyCallResponse response = service.myCall(null, request);
coprocessorService 在接口中 AdminserverName - the server name to which the endpoint call is madepublic void updateConfiguration(ServerName server) throws IOException
AdminupdateConfiguration 在接口中 Adminserver - : The server whose config needs to be updated.IOExceptionpublic void updateConfiguration()
throws IOException
AdminupdateConfiguration 在接口中 AdminIOExceptionpublic long getLastMajorCompactionTimestamp(TableName tableName) throws IOException
AdmingetLastMajorCompactionTimestamp 在接口中 AdmintableName - table to examineIOException - if a remote or network exception occurspublic long getLastMajorCompactionTimestampForRegion(byte[] regionName)
throws IOException
AdmingetLastMajorCompactionTimestampForRegion 在接口中 AdminregionName - region to examineIOException - if a remote or network exception occurspublic void compact(TableName tableName, byte[] columnFamily, CompactType compactType) throws IOException, InterruptedException
compact 在接口中 AdmintableName - table to compactcolumnFamily - column family within a tablecompactType - CompactTypeIOException - if not a mob column family or if a remote or network exception occursInterruptedExceptionpublic void compact(TableName tableName, CompactType compactType) throws IOException, InterruptedException
compact 在接口中 AdmintableName - table to compactcompactType - CompactTypeIOException - if a remote or network exception occursInterruptedExceptionpublic void majorCompact(TableName tableName, byte[] columnFamily, CompactType compactType) throws IOException, InterruptedException
majorCompact 在接口中 AdmintableName - table to compactcolumnFamily - column family within a tablecompactType - CompactTypeIOException - if not a mob column family or if a remote or network exception occursInterruptedExceptionpublic void majorCompact(TableName tableName, CompactType compactType) throws IOException, InterruptedException
majorCompact 在接口中 AdmintableName - table to compactcompactType - CompactTypeIOException - if a remote or network exception occursInterruptedExceptionpublic CompactionState getCompactionState(TableName tableName, CompactType compactType) throws IOException
getCompactionState 在接口中 AdmintableName - table to examinecompactType - CompactTypeIOException - if a remote or network exception occurspublic List<SecurityCapability> getSecurityCapabilities() throws IOException
AdmingetSecurityCapabilities 在接口中 AdminIOExceptionpublic boolean splitSwitch(boolean enabled,
boolean synchronous)
throws IOException
AdminsplitSwitch 在接口中 Adminenabled - enabled or notsynchronous - If true, it waits until current split() call, if outstanding,
to return.IOExceptionpublic boolean mergeSwitch(boolean enabled,
boolean synchronous)
throws IOException
AdminmergeSwitch 在接口中 Adminenabled - enabled or notsynchronous - If true, it waits until current merge() call, if outstanding,
to return.IOExceptionpublic boolean isSplitEnabled()
throws IOException
AdminisSplitEnabled 在接口中 Admintrue if the switch is enabled, false otherwise.IOExceptionpublic boolean isMergeEnabled()
throws IOException
AdminisMergeEnabled 在接口中 Admintrue if the switch is enabled, false otherwise.IOExceptionpublic void addReplicationPeer(String peerId, ReplicationPeerConfig peerConfig, boolean enabled) throws IOException
AdminaddReplicationPeer 在接口中 AdminpeerId - a short name that identifies the peerpeerConfig - configuration for the replication peerenabled - peer state, true if ENABLED and false if DISABLEDIOException - if a remote or network exception occurspublic Future<Void> addReplicationPeerAsync(String peerId, ReplicationPeerConfig peerConfig, boolean enabled) throws IOException
AdminYou can use Future.get(long, TimeUnit) to wait on the operation to complete. It may throw ExecutionException if there was an error while executing the operation or TimeoutException in case the wait timeout was not long enough to allow the operation to complete.
addReplicationPeerAsync 在接口中 AdminpeerId - a short name that identifies the peerpeerConfig - configuration for the replication peerenabled - peer state, true if ENABLED and false if DISABLEDIOException - IOException if a remote or network exception occurspublic void removeReplicationPeer(String peerId) throws IOException
AdminremoveReplicationPeer 在接口中 AdminpeerId - a short name that identifies the peerIOException - if a remote or network exception occurspublic Future<Void> removeReplicationPeerAsync(String peerId) throws IOException
AdminYou can use Future.get(long, TimeUnit) to wait on the operation to complete. It may throw ExecutionException if there was an error while executing the operation or TimeoutException in case the wait timeout was not long enough to allow the operation to complete.
removeReplicationPeerAsync 在接口中 AdminpeerId - a short name that identifies the peerIOException - IOException if a remote or network exception occurspublic void enableReplicationPeer(String peerId) throws IOException
AdminenableReplicationPeer 在接口中 AdminpeerId - a short name that identifies the peerIOException - if a remote or network exception occurspublic Future<Void> enableReplicationPeerAsync(String peerId) throws IOException
AdminYou can use Future.get(long, TimeUnit) to wait on the operation to complete. It may throw ExecutionException if there was an error while executing the operation or TimeoutException in case the wait timeout was not long enough to allow the operation to complete.
enableReplicationPeerAsync 在接口中 AdminpeerId - a short name that identifies the peerIOException - IOException if a remote or network exception occurspublic void disableReplicationPeer(String peerId) throws IOException
AdmindisableReplicationPeer 在接口中 AdminpeerId - a short name that identifies the peerIOException - if a remote or network exception occurspublic Future<Void> disableReplicationPeerAsync(String peerId) throws IOException
AdminYou can use Future.get(long, TimeUnit) to wait on the operation to complete. It may throw ExecutionException if there was an error while executing the operation or TimeoutException in case the wait timeout was not long enough to allow the operation to complete.
disableReplicationPeerAsync 在接口中 AdminpeerId - a short name that identifies the peerIOException - IOException if a remote or network exception occurspublic ReplicationPeerConfig getReplicationPeerConfig(String peerId) throws IOException
AdmingetReplicationPeerConfig 在接口中 AdminpeerId - a short name that identifies the peerIOException - if a remote or network exception occurspublic void updateReplicationPeerConfig(String peerId, ReplicationPeerConfig peerConfig) throws IOException
AdminupdateReplicationPeerConfig 在接口中 AdminpeerId - a short name that identifies the peerpeerConfig - new config for the replication peerIOException - if a remote or network exception occurspublic Future<Void> updateReplicationPeerConfigAsync(String peerId, ReplicationPeerConfig peerConfig) throws IOException
AdminYou can use Future.get(long, TimeUnit) to wait on the operation to complete. It may throw ExecutionException if there was an error while executing the operation or TimeoutException in case the wait timeout was not long enough to allow the operation to complete.
updateReplicationPeerConfigAsync 在接口中 AdminpeerId - a short name that identifies the peerpeerConfig - new config for the replication peerIOException - IOException if a remote or network exception occurspublic void appendReplicationPeerTableCFs(String id, Map<TableName,List<String>> tableCfs) throws ReplicationException, IOException
AdminappendReplicationPeerTableCFs 在接口中 Adminid - a short that identifies the clustertableCfs - A map from tableName to column family namesReplicationException - if tableCfs has conflict with existing configIOException - if a remote or network exception occurspublic void removeReplicationPeerTableCFs(String id, Map<TableName,List<String>> tableCfs) throws ReplicationException, IOException
AdminremoveReplicationPeerTableCFs 在接口中 Adminid - a short name that identifies the clustertableCfs - A map from tableName to column family namesReplicationException - if tableCfs has conflict with existing configIOException - if a remote or network exception occurspublic List<ReplicationPeerDescription> listReplicationPeers() throws IOException
AdminlistReplicationPeers 在接口中 AdminIOException - if a remote or network exception occurspublic List<ReplicationPeerDescription> listReplicationPeers(Pattern pattern) throws IOException
AdminlistReplicationPeers 在接口中 Adminpattern - The compiled regular expression to match peer idIOException - if a remote or network exception occurspublic void decommissionRegionServers(List<ServerName> servers, boolean offload) throws IOException
AdmindecommissionRegionServers 在接口中 Adminservers - The list of servers to decommission.offload - True to offload the regions from the decommissioned serversIOExceptionpublic List<ServerName> listDecommissionedRegionServers() throws IOException
AdminlistDecommissionedRegionServers 在接口中 AdminIOExceptionpublic void recommissionRegionServer(ServerName server, List<byte[]> encodedRegionNames) throws IOException
AdminrecommissionRegionServer 在接口中 Adminserver - The server to recommission.encodedRegionNames - Regions to load onto the server.IOExceptionpublic List<TableCFs> listReplicatedTableCFs() throws IOException
AdminlistReplicatedTableCFs 在接口中 AdminIOExceptionpublic void enableTableReplication(TableName tableName) throws IOException
AdminenableTableReplication 在接口中 AdmintableName - name of the tableIOException - if a remote or network exception occurspublic void disableTableReplication(TableName tableName) throws IOException
AdmindisableTableReplication 在接口中 AdmintableName - name of the tableIOException - if a remote or network exception occurspublic void clearCompactionQueues(ServerName sn, Set<String> queues) throws IOException, InterruptedException
AdminclearCompactionQueues 在接口中 Adminsn - the region server namequeues - the set of queue nameIOException - if a remote or network exception occursInterruptedExceptionpublic List<ServerName> clearDeadServers(List<ServerName> servers) throws IOException
AdminclearDeadServers 在接口中 Adminservers - list of dead region servers.IOException - if a remote or network exception occurspublic void cloneTableSchema(TableName tableName, TableName newTableName, boolean preserveSplits) throws IOException
AdmincloneTableSchema 在接口中 AdmintableName - name of the table to be clonednewTableName - name of the new table where the table will be createdpreserveSplits - True if the splits should be preservedIOException - if a remote or network exception occurspublic boolean switchRpcThrottle(boolean enable)
throws IOException
AdminswitchRpcThrottle 在接口中 Adminenable - Set to true to enable, false to disable.IOExceptionpublic boolean isRpcThrottleEnabled()
throws IOException
AdminisRpcThrottleEnabled 在接口中 AdminIOExceptionpublic boolean exceedThrottleQuotaSwitch(boolean enable)
throws IOException
AdminexceedThrottleQuotaSwitch 在接口中 Adminenable - Set to true to enable, false to disable.IOExceptionpublic Map<TableName,Long> getSpaceQuotaTableSizes() throws IOException
AdmingetSpaceQuotaTableSizes 在接口中 AdminIOExceptionpublic Map<TableName,SpaceQuotaSnapshot> getRegionServerSpaceQuotaSnapshots(ServerName serverName) throws IOException
AdminSpaceQuotaSnapshotViews observed by a RegionServer.getRegionServerSpaceQuotaSnapshots 在接口中 AdminIOExceptionpublic SpaceQuotaSnapshot getCurrentSpaceQuotaSnapshot(String namespace) throws IOException
Adminnamespace or null if the Master has
no quota information on that namespace.getCurrentSpaceQuotaSnapshot 在接口中 AdminIOExceptionpublic SpaceQuotaSnapshot getCurrentSpaceQuotaSnapshot(TableName tableName) throws IOException
AdmintableName or null if the Master has
no quota information on that table.getCurrentSpaceQuotaSnapshot 在接口中 AdminIOExceptionpublic void grant(UserPermission userPermission, boolean mergeExistingPermissions) throws IOException
Admingrant 在接口中 AdminuserPermission - user name and the specific permissionmergeExistingPermissions - If set to false, later granted permissions will override
previous granted permissions. otherwise, it'll merge with previous granted
permissions.IOException - if a remote or network exception occurspublic void revoke(UserPermission userPermission) throws IOException
Adminrevoke 在接口中 AdminuserPermission - user name and the specific permissionIOException - if a remote or network exception occurspublic List<UserPermission> getUserPermissions(GetUserPermissionsRequest getUserPermissionsRequest) throws IOException
AdmingetUserPermissions 在接口中 AdmingetUserPermissionsRequest - A request contains which user, global, namespace or table
permissions neededIOException - if a remote or network exception occurspublic Future<Void> splitRegionAsync(byte[] regionName) throws IOException
AdminsplitRegionAsync 在接口中 AdminregionName - region to splitIOException - if a remote or network exception occurspublic Future<Void> createTableAsync(TableDescriptor desc) throws IOException
AdmincreateTableAsync 在接口中 Admindesc - table descriptor for tableIOException - if a remote or network exception occurspublic List<Boolean> hasUserPermissions(String userName, List<Permission> permissions) throws IOException
AdminhasUserPermissions 在接口中 AdminuserName - the user namepermissions - the specific permission listIOException - if a remote or network exception occursCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.