Modifier and Type | Method and Description |
---|---|
boolean |
abortProcedure(long procId,
boolean mayInterruptIfRunning)
Abort a procedure.
|
long |
addColumn(TableName tableName,
ColumnFamilyDescriptor column,
long nonceGroup,
long nonce)
Add a new column to an existing table
|
void |
addReplicationPeer(String peerId,
ReplicationPeerConfig peerConfig)
Add a new replication peer for replicating data to slave cluster
|
void |
checkIfShouldMoveSystemRegionAsync() |
void |
checkTableModifiable(TableName tableName)
Check table is modifiable; i.e.
|
long |
createSystemTable(TableDescriptor tableDescriptor)
Create a system table using the given table definition.
|
long |
createTable(TableDescriptor desc,
byte[][] splitKeys,
long nonceGroup,
long nonce)
Create a table using the given table definition.
|
long |
deleteColumn(TableName tableName,
byte[] columnName,
long nonceGroup,
long nonce)
Delete a column from an existing table
|
long |
deleteTable(TableName tableName,
long nonceGroup,
long nonce)
Delete a table
|
void |
disableReplicationPeer(String peerId)
Stop the replication stream to the specified peer
|
long |
disableTable(TableName tableName,
long nonceGroup,
long nonce)
Disable an existing table
|
void |
drainRegionServer(ServerName server)
Mark a region server as draining to prevent additional regions from getting assigned to it.
|
void |
enableReplicationPeer(String peerId)
Restart the replication stream to the specified peer
|
long |
enableTable(TableName tableName,
long nonceGroup,
long nonce)
Enable an existing table
|
AssignmentManager |
getAssignmentManager() |
CatalogJanitor |
getCatalogJanitor() |
String |
getClientIdAuditPrefix() |
ClusterSchema |
getClusterSchema() |
ExecutorService |
getExecutorService() |
FavoredNodesManager |
getFavoredNodesManager() |
ProcedureEvent |
getInitializedEvent() |
long |
getLastMajorCompactionTimestamp(TableName table) |
long |
getLastMajorCompactionTimestampForRegion(byte[] regionName) |
LoadBalancer |
getLoadBalancer() |
LockManager |
getLockManager() |
List<LockedResource> |
getLocks()
Get locks
|
MasterCoprocessorHost |
getMasterCoprocessorHost() |
MasterFileSystem |
getMasterFileSystem() |
MetricsMaster |
getMasterMetrics() |
ProcedureExecutor<MasterProcedureEnv> |
getMasterProcedureExecutor() |
MasterProcedureManagerHost |
getMasterProcedureManagerHost() |
MasterQuotaManager |
getMasterQuotaManager() |
MasterWalManager |
getMasterWalManager() |
List<Procedure<?>> |
getProcedures()
Get procedures
|
RegionNormalizer |
getRegionNormalizer() |
String |
getRegionServerVersion(ServerName sn) |
ReplicationPeerConfig |
getReplicationPeerConfig(String peerId)
Returns the configured ReplicationPeerConfig for the specified peer
|
ServerManager |
getServerManager() |
SnapshotManager |
getSnapshotManager() |
TableDescriptors |
getTableDescriptors() |
TableStateManager |
getTableStateManager() |
boolean |
isActiveMaster() |
boolean |
isInitialized() |
boolean |
isInMaintenanceMode() |
boolean |
isServerCrashProcessingEnabled() |
boolean |
isSplitOrMergeEnabled(MasterSwitchType switchType) |
boolean |
isStopping() |
List<ServerName> |
listDrainingRegionServers()
List region servers marked as draining to not get additional regions assigned to them.
|
List<ReplicationPeerDescription> |
listReplicationPeers(String regex)
Return a list of replication peers.
|
List<TableDescriptor> |
listTableDescriptorsByNamespace(String name)
Get list of table descriptors by namespace
|
List<TableName> |
listTableNamesByNamespace(String name)
Get list of table names by namespace
|
long |
mergeRegions(HRegionInfo[] regionsToMerge,
boolean forcible,
long nonceGroup,
long nonce)
Merge regions in a table.
|
long |
modifyColumn(TableName tableName,
ColumnFamilyDescriptor descriptor,
long nonceGroup,
long nonce)
Modify the column descriptor of an existing column in an existing table
|
long |
modifyTable(TableName tableName,
TableDescriptor descriptor,
long nonceGroup,
long nonce)
Modify the descriptor of an existing table
|
boolean |
recoverMeta()
Recover meta table.
|
boolean |
registerService(com.google.protobuf.Service instance)
Registers a new protocol buffer
Service subclass as a master coprocessor endpoint. |
void |
removeDrainFromRegionServer(ServerName server)
Remove drain from a region server to allow additional regions assignments.
|
void |
removeReplicationPeer(String peerId)
Removes a peer and stops the replication
|
long |
splitRegion(HRegionInfo regionInfo,
byte[] splitRow,
long nonceGroup,
long nonce)
Split a region.
|
long |
truncateTable(TableName tableName,
boolean preserveSplits,
long nonceGroup,
long nonce)
Truncate a table
|
void |
updateReplicationPeerConfig(String peerId,
ReplicationPeerConfig peerConfig)
Update the peerConfig for the specified peer
|
getChoreService, getClusterConnection, getConfiguration, getConnection, getCoordinatedStateManager, getMetaTableLocator, getServerName, getZooKeeper
SnapshotManager getSnapshotManager()
MasterProcedureManagerHost getMasterProcedureManagerHost()
ClusterSchema getClusterSchema()
ClusterSchema
AssignmentManager getAssignmentManager()
AssignmentManager
MasterFileSystem getMasterFileSystem()
MasterFileSystem
utility class.MasterWalManager getMasterWalManager()
MasterWalManager
utility class.ServerManager getServerManager()
ServerManager
instance.ExecutorService getExecutorService()
ExecutorService
TableStateManager getTableStateManager()
TableStateManager
MasterCoprocessorHost getMasterCoprocessorHost()
MasterCoprocessorHost
MasterQuotaManager getMasterQuotaManager()
MasterQuotaManager
RegionNormalizer getRegionNormalizer()
RegionNormalizer
CatalogJanitor getCatalogJanitor()
CatalogJanitor
ProcedureExecutor<MasterProcedureEnv> getMasterProcedureExecutor()
ProcedureExecutor
ProcedureEvent getInitializedEvent()
MetricsMaster getMasterMetrics()
MetricsMaster
void checkTableModifiable(TableName tableName) throws IOException, TableNotFoundException, TableNotDisabledException
tableName
- Name of table to check.TableNotDisabledException
TableNotFoundException
IOException
long createTable(TableDescriptor desc, byte[][] splitKeys, long nonceGroup, long nonce) throws IOException
desc
- The table definitionsplitKeys
- Starting row keys for the initial table regions. If nullnonceGroup
- nonce
- a single region is created.IOException
long createSystemTable(TableDescriptor tableDescriptor) throws IOException
tableDescriptor
- The system table definition
a single region is created.IOException
long deleteTable(TableName tableName, long nonceGroup, long nonce) throws IOException
tableName
- The table namenonceGroup
- nonce
- IOException
long truncateTable(TableName tableName, boolean preserveSplits, long nonceGroup, long nonce) throws IOException
tableName
- The table namepreserveSplits
- True if the splits should be preservednonceGroup
- nonce
- IOException
long modifyTable(TableName tableName, TableDescriptor descriptor, long nonceGroup, long nonce) throws IOException
tableName
- The table namedescriptor
- The updated table descriptornonceGroup
- nonce
- IOException
long enableTable(TableName tableName, long nonceGroup, long nonce) throws IOException
tableName
- The table namenonceGroup
- nonce
- IOException
long disableTable(TableName tableName, long nonceGroup, long nonce) throws IOException
tableName
- The table namenonceGroup
- nonce
- IOException
long addColumn(TableName tableName, ColumnFamilyDescriptor column, long nonceGroup, long nonce) throws IOException
tableName
- The table namecolumn
- The column definitionnonceGroup
- nonce
- IOException
long modifyColumn(TableName tableName, ColumnFamilyDescriptor descriptor, long nonceGroup, long nonce) throws IOException
tableName
- The table namedescriptor
- The updated column definitionnonceGroup
- nonce
- IOException
long deleteColumn(TableName tableName, byte[] columnName, long nonceGroup, long nonce) throws IOException
tableName
- The table namecolumnName
- The column namenonceGroup
- nonce
- IOException
long mergeRegions(HRegionInfo[] regionsToMerge, boolean forcible, long nonceGroup, long nonce) throws IOException
regionsToMerge
- daughter regions to mergeforcible
- whether to force to merge even two regions are not adjacentnonceGroup
- used to detect duplicatenonce
- used to detect duplicateIOException
long splitRegion(HRegionInfo regionInfo, byte[] splitRow, long nonceGroup, long nonce) throws IOException
regionInfo
- region to splitsplitRow
- split pointnonceGroup
- used to detect duplicatenonce
- used to detect duplicateIOException
TableDescriptors getTableDescriptors()
boolean isServerCrashProcessingEnabled()
boolean registerService(com.google.protobuf.Service instance)
Service
subclass as a master coprocessor endpoint.
Only a single instance may be registered for a given Service
subclass (the
instances are keyed on Descriptors.ServiceDescriptor.getFullName()
.
After the first registration, subsequent calls with the same service name will fail with
a return value of false
.
instance
- the Service
subclass instance to expose as a coprocessor endpointtrue
if the registration was successful, false
otherwiseboolean isActiveMaster()
boolean isInitialized()
boolean isInMaintenanceMode()
boolean abortProcedure(long procId, boolean mayInterruptIfRunning) throws IOException
procId
- ID of the proceduremayInterruptIfRunning
- if the proc completed at least one step, should it be aborted?IOException
List<Procedure<?>> getProcedures() throws IOException
IOException
List<LockedResource> getLocks() throws IOException
IOException
List<TableDescriptor> listTableDescriptorsByNamespace(String name) throws IOException
name
- namespace nameIOException
List<TableName> listTableNamesByNamespace(String name) throws IOException
name
- namespace nameIOException
long getLastMajorCompactionTimestamp(TableName table) throws IOException
table
- the table for which last successful major compaction time is queriedIOException
long getLastMajorCompactionTimestampForRegion(byte[] regionName) throws IOException
regionName
- IOException
LoadBalancer getLoadBalancer()
boolean isStopping()
boolean isSplitOrMergeEnabled(MasterSwitchType switchType)
FavoredNodesManager getFavoredNodesManager()
void addReplicationPeer(String peerId, ReplicationPeerConfig peerConfig) throws ReplicationException, IOException
peerId
- a short name that identifies the peerpeerConfig
- configuration for the replication slave clusterReplicationException
IOException
void removeReplicationPeer(String peerId) throws ReplicationException, IOException
peerId
- a short name that identifies the peerReplicationException
IOException
void enableReplicationPeer(String peerId) throws ReplicationException, IOException
peerId
- a short name that identifies the peerReplicationException
IOException
void disableReplicationPeer(String peerId) throws ReplicationException, IOException
peerId
- a short name that identifies the peerReplicationException
IOException
ReplicationPeerConfig getReplicationPeerConfig(String peerId) throws ReplicationException, IOException
peerId
- a short name that identifies the peerReplicationException
IOException
void updateReplicationPeerConfig(String peerId, ReplicationPeerConfig peerConfig) throws ReplicationException, IOException
peerId
- a short name that identifies the peerpeerConfig
- new config for the peerReplicationException
IOException
List<ReplicationPeerDescription> listReplicationPeers(String regex) throws ReplicationException, IOException
regex
- The regular expression to match peer idReplicationException
IOException
void drainRegionServer(ServerName server)
server
- Region servers to drain.List<ServerName> listDrainingRegionServers()
void removeDrainFromRegionServer(ServerName server)
server
- Region server to remove drain from.LockManager getLockManager()
LockManager
to lock namespaces/tables/regions.String getRegionServerVersion(ServerName sn)
void checkIfShouldMoveSystemRegionAsync()
boolean recoverMeta() throws IOException
IOException
String getClientIdAuditPrefix()
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.