@InterfaceAudience.Private public interface MasterServices extends Server
| Modifier and Type | Method and Description |
|---|---|
boolean |
abortProcedure(long procId,
boolean mayInterruptIfRunning)
Abort a procedure.
|
void |
addColumn(TableName tableName,
HColumnDescriptor column,
long nonceGroup,
long nonce)
Add a new column to an existing table
|
Pair<java.lang.Long,java.lang.String> |
backupTables(BackupType type,
java.util.List<TableName> tableList,
java.lang.String targetRootDir,
int workers,
long bandwidth)
Full backup given list of tables
|
void |
checkTableModifiable(TableName tableName)
Check table is modifiable; i.e.
|
void |
createNamespace(NamespaceDescriptor descriptor)
Create a new namespace
|
long |
createTable(HTableDescriptor desc,
byte[][] splitKeys,
long nonceGroup,
long nonce)
Create a table using the given table definition.
|
void |
deleteColumn(TableName tableName,
byte[] columnName,
long nonceGroup,
long nonce)
Delete a column from an existing table
|
void |
deleteNamespace(java.lang.String name)
Delete an existing namespace.
|
long |
deleteTable(TableName tableName,
long nonceGroup,
long nonce)
Delete a table
|
long |
disableTable(TableName tableName,
long nonceGroup,
long nonce)
Disable an existing table
|
void |
dispatchMergingRegions(HRegionInfo region_a,
HRegionInfo region_b,
boolean forcible)
Merge two regions.
|
long |
enableTable(TableName tableName,
long nonceGroup,
long nonce)
Enable an existing table
|
AssignmentManager |
getAssignmentManager() |
ExecutorService |
getExecutorService() |
long |
getLastMajorCompactionTimestamp(TableName table) |
long |
getLastMajorCompactionTimestampForRegion(byte[] regionName) |
LoadBalancer |
getLoadBalancer() |
MasterCoprocessorHost |
getMasterCoprocessorHost() |
MasterFileSystem |
getMasterFileSystem() |
ProcedureExecutor<MasterProcedureEnv> |
getMasterProcedureExecutor() |
MasterProcedureManagerHost |
getMasterProcedureManagerHost() |
MasterQuotaManager |
getMasterQuotaManager() |
NamespaceDescriptor |
getNamespaceDescriptor(java.lang.String name)
Get a namespace descriptor by name
|
ServerManager |
getServerManager() |
SnapshotManager |
getSnapshotManager() |
TableDescriptors |
getTableDescriptors() |
TableLockManager |
getTableLockManager() |
TableStateManager |
getTableStateManager() |
boolean |
isInitialized() |
boolean |
isInMaintenanceMode() |
boolean |
isMasterProcedureExecutorEnabled()
Check whether the procedure executor is enabled
|
boolean |
isNamespaceManagerInitialized() |
boolean |
isServerShutdownHandlerEnabled() |
java.util.List<NamespaceDescriptor> |
listNamespaceDescriptors()
List available namespace descriptors
|
java.util.List<ProcedureInfo> |
listProcedures()
List procedures
|
java.util.List<HTableDescriptor> |
listTableDescriptorsByNamespace(java.lang.String name)
Get list of table descriptors by namespace
|
java.util.List<TableName> |
listTableNamesByNamespace(java.lang.String name)
Get list of table names by namespace
|
void |
modifyColumn(TableName tableName,
HColumnDescriptor descriptor,
long nonceGroup,
long nonce)
Modify the column descriptor of an existing column in an existing table
|
void |
modifyNamespace(NamespaceDescriptor descriptor)
Modify an existing namespace
|
void |
modifyTable(TableName tableName,
HTableDescriptor descriptor,
long nonceGroup,
long nonce)
Modify the descriptor of an existing table
|
boolean |
registerService(Service instance)
Registers a new protocol buffer
Service subclass as a master coprocessor endpoint. |
void |
truncateTable(TableName tableName,
boolean preserveSplits,
long nonceGroup,
long nonce)
Truncate a table
|
getChoreService, getConfiguration, getConnection, getCoordinatedStateManager, getMetaTableLocator, getServerName, getZooKeeperSnapshotManager getSnapshotManager()
MasterProcedureManagerHost getMasterProcedureManagerHost()
AssignmentManager getAssignmentManager()
AssignmentManagerMasterFileSystem getMasterFileSystem()
MasterFileSystem utility class.ServerManager getServerManager()
ServerManager instance.ExecutorService getExecutorService()
ExecutorServiceTableLockManager getTableLockManager()
TableLockManagerMasterCoprocessorHost getMasterCoprocessorHost()
MasterCoprocessorHostMasterQuotaManager getMasterQuotaManager()
MasterQuotaManagerProcedureExecutor<MasterProcedureEnv> getMasterProcedureExecutor()
ProcedureExecutorvoid checkTableModifiable(TableName tableName) throws java.io.IOException, TableNotFoundException, TableNotDisabledException
tableName - Name of table to check.TableNotDisabledExceptionTableNotFoundExceptionjava.io.IOExceptionboolean isMasterProcedureExecutorEnabled()
long createTable(HTableDescriptor desc, byte[][] splitKeys, long nonceGroup, long nonce) throws java.io.IOException
desc - The table definitionsplitKeys - Starting row keys for the initial table regions. If nullnonceGroup - nonce - a single region is created.java.io.IOExceptionlong deleteTable(TableName tableName, long nonceGroup, long nonce) throws java.io.IOException
tableName - The table namenonceGroup - nonce - java.io.IOExceptionvoid truncateTable(TableName tableName, boolean preserveSplits, long nonceGroup, long nonce) throws java.io.IOException
tableName - The table namepreserveSplits - True if the splits should be preservednonceGroup - nonce - java.io.IOExceptionvoid modifyTable(TableName tableName, HTableDescriptor descriptor, long nonceGroup, long nonce) throws java.io.IOException
tableName - The table namedescriptor - The updated table descriptornonceGroup - nonce - java.io.IOExceptionPair<java.lang.Long,java.lang.String> backupTables(BackupType type, java.util.List<TableName> tableList, java.lang.String targetRootDir, int workers, long bandwidth) throws java.io.IOException
type - whether the backup is full or incrementaltableList - list of tables to backuptargetRootDir - root dir for saving the backupworkers - number of paralle workers. -1 - system definedbandwidth - bandwidth per worker in MB per sec. -1 - unlimitedjava.io.IOExceptionlong enableTable(TableName tableName, long nonceGroup, long nonce) throws java.io.IOException
tableName - The table namenonceGroup - nonce - java.io.IOExceptionlong disableTable(TableName tableName, long nonceGroup, long nonce) throws java.io.IOException
tableName - The table namenonceGroup - nonce - java.io.IOExceptionvoid addColumn(TableName tableName, HColumnDescriptor column, long nonceGroup, long nonce) throws java.io.IOException
tableName - The table namecolumn - The column definitionnonceGroup - nonce - java.io.IOExceptionvoid modifyColumn(TableName tableName, HColumnDescriptor descriptor, long nonceGroup, long nonce) throws java.io.IOException
tableName - The table namedescriptor - The updated column definitionnonceGroup - nonce - java.io.IOExceptionvoid deleteColumn(TableName tableName, byte[] columnName, long nonceGroup, long nonce) throws java.io.IOException
tableName - The table namecolumnName - The column namenonceGroup - nonce - java.io.IOExceptionTableDescriptors getTableDescriptors()
boolean isServerShutdownHandlerEnabled()
boolean registerService(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 com.google.protobuf.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
otherwisevoid dispatchMergingRegions(HRegionInfo region_a, HRegionInfo region_b, boolean forcible) throws java.io.IOException
region_a - region to mergeregion_b - region to mergeforcible - true if do a compulsory merge, otherwise we will only merge
two adjacent regionsjava.io.IOExceptionboolean isInitialized()
boolean isNamespaceManagerInitialized()
void createNamespace(NamespaceDescriptor descriptor) throws java.io.IOException
descriptor - descriptor which describes the new namespacejava.io.IOExceptionvoid modifyNamespace(NamespaceDescriptor descriptor) throws java.io.IOException
descriptor - descriptor which updates the existing namespacejava.io.IOExceptionvoid deleteNamespace(java.lang.String name)
throws java.io.IOException
name - namespace namejava.io.IOExceptionboolean isInMaintenanceMode()
boolean abortProcedure(long procId,
boolean mayInterruptIfRunning)
throws java.io.IOException
procId - ID of the proceduremayInterruptIfRunning - if the proc completed at least one step, should it be aborted?java.io.IOExceptionjava.util.List<ProcedureInfo> listProcedures() throws java.io.IOException
java.io.IOExceptionNamespaceDescriptor getNamespaceDescriptor(java.lang.String name) throws java.io.IOException
name - name of namespace descriptorjava.io.IOExceptionjava.util.List<NamespaceDescriptor> listNamespaceDescriptors() throws java.io.IOException
java.io.IOExceptionjava.util.List<HTableDescriptor> listTableDescriptorsByNamespace(java.lang.String name) throws java.io.IOException
name - namespace namejava.io.IOExceptionjava.util.List<TableName> listTableNamesByNamespace(java.lang.String name) throws java.io.IOException
name - namespace namejava.io.IOExceptionlong getLastMajorCompactionTimestamp(TableName table) throws java.io.IOException
table - java.io.IOExceptionlong getLastMajorCompactionTimestampForRegion(byte[] regionName)
throws java.io.IOException
regionName - java.io.IOExceptionLoadBalancer getLoadBalancer()
TableStateManager getTableStateManager()