@InterfaceAudience.Private public interface MasterServices extends Server
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(TableName tableName,
HColumnDescriptor column)
Add a new column to an existing table
|
void |
checkTableModifiable(TableName tableName)
Check table is modifiable; i.e.
|
void |
createNamespace(NamespaceDescriptor descriptor)
Create a new namespace
|
void |
createTable(HTableDescriptor desc,
byte[][] splitKeys)
Create a table using the given table definition.
|
void |
deleteColumn(TableName tableName,
byte[] columnName)
Delete a column from an existing table
|
void |
deleteNamespace(String name)
Delete an existing namespace.
|
void |
deleteTable(TableName tableName)
Delete a table
|
void |
disableTable(TableName tableName)
Disable an existing table
|
void |
dispatchMergingRegions(HRegionInfo region_a,
HRegionInfo region_b,
boolean forcible)
Merge two regions.
|
void |
enableTable(TableName tableName)
Enable an existing table
|
AssignmentManager |
getAssignmentManager() |
MasterCoprocessorHost |
getCoprocessorHost() |
ExecutorService |
getExecutorService() |
MasterFileSystem |
getMasterFileSystem() |
NamespaceDescriptor |
getNamespaceDescriptor(String name)
Get a namespace descriptor by name
|
ServerManager |
getServerManager() |
TableDescriptors |
getTableDescriptors() |
TableLockManager |
getTableLockManager() |
boolean |
isInitialized() |
boolean |
isServerShutdownHandlerEnabled() |
List<NamespaceDescriptor> |
listNamespaceDescriptors()
List available namespace descriptors
|
List<HTableDescriptor> |
listTableDescriptorsByNamespace(String name)
Get list of table descriptors by namespace
|
List<TableName> |
listTableNamesByNamespace(String name)
Get list of table names by namespace
|
void |
modifyColumn(TableName tableName,
HColumnDescriptor descriptor)
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)
Modify the descriptor of an existing table
|
boolean |
registerService(com.google.protobuf.Service instance)
Registers a new protocol buffer
Service subclass as a master coprocessor endpoint. |
getCatalogTracker, getConfiguration, getServerName, getZooKeeperAssignmentManager getAssignmentManager()
AssignmentManagerMasterFileSystem getMasterFileSystem()
MasterFileSystem utility class.ServerManager getServerManager()
ServerManager instance.ExecutorService getExecutorService()
ExecutorServiceTableLockManager getTableLockManager()
TableLockManagerMasterCoprocessorHost getCoprocessorHost()
MasterCoprocessorHostvoid checkTableModifiable(TableName tableName) throws IOException, TableNotFoundException, TableNotDisabledException
tableName - Name of table to check.TableNotDisabledExceptionTableNotFoundExceptionIOExceptionvoid createTable(HTableDescriptor desc, byte[][] splitKeys) throws IOException
desc - The table definitionsplitKeys - Starting row keys for the initial table regions. If null
a single region is created.IOExceptionvoid deleteTable(TableName tableName) throws IOException
tableName - The table nameIOExceptionvoid modifyTable(TableName tableName, HTableDescriptor descriptor) throws IOException
tableName - The table namedescriptor - The updated table descriptorIOExceptionvoid enableTable(TableName tableName) throws IOException
tableName - The table nameIOExceptionvoid disableTable(TableName tableName) throws IOException
tableName - The table nameIOExceptionvoid addColumn(TableName tableName, HColumnDescriptor column) throws IOException
tableName - The table namecolumn - The column definitionIOExceptionvoid modifyColumn(TableName tableName, HColumnDescriptor descriptor) throws IOException
tableName - The table namedescriptor - The updated column definitionIOExceptionvoid deleteColumn(TableName tableName, byte[] columnName) throws IOException
tableName - The table namecolumnName - The column nameIOExceptionTableDescriptors getTableDescriptors()
boolean isServerShutdownHandlerEnabled()
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
otherwisevoid dispatchMergingRegions(HRegionInfo region_a, HRegionInfo region_b, boolean forcible) throws IOException
region_a - region to mergeregion_b - region to mergeforcible - true if do a compulsory merge, otherwise we will only merge
two adjacent regionsIOExceptionboolean isInitialized()
void createNamespace(NamespaceDescriptor descriptor) throws IOException
descriptor - descriptor which describes the new namespaceIOExceptionvoid modifyNamespace(NamespaceDescriptor descriptor) throws IOException
descriptor - descriptor which updates the existing namespaceIOExceptionvoid deleteNamespace(String name) throws IOException
name - namespace nameIOExceptionNamespaceDescriptor getNamespaceDescriptor(String name) throws IOException
name - name of namespace descriptorIOExceptionList<NamespaceDescriptor> listNamespaceDescriptors() throws IOException
IOExceptionList<HTableDescriptor> listTableDescriptorsByNamespace(String name) throws IOException
name - namespace nameIOExceptionList<TableName> listTableNamesByNamespace(String name) throws IOException
name - namespace nameIOExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.