@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
|
void |
checkIfShouldMoveSystemRegionAsync() |
void |
checkTableModifiable(TableName tableName)
Check table is modifiable; i.e.
|
void |
createNamespace(NamespaceDescriptor descriptor,
long nonceGroup,
long nonce)
Create a new namespace
|
void |
createNamespaceSync(NamespaceDescriptor descriptor,
long nonceGroup,
long nonce,
boolean executeCoprocessor)
Create a new namespace synchronously.
|
long |
createSystemTable(HTableDescriptor hTableDescriptor)
Create a system table using the given table definition.
|
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(String name,
long nonceGroup,
long nonce)
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,
User user)
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(String name)
Get a namespace descriptor by name
|
String |
getRegionServerVersion(ServerName sn) |
ServerManager |
getServerManager() |
SnapshotManager |
getSnapshotManager() |
TableDescriptors |
getTableDescriptors() |
TableLockManager |
getTableLockManager() |
TableNamespaceManager |
getTableNamespaceManager() |
boolean |
isInitialized() |
boolean |
isInMaintenanceMode() |
boolean |
isServerCrashProcessingEnabled() |
List<NamespaceDescriptor> |
listNamespaceDescriptors()
List available namespace descriptors
|
List<ProcedureInfo> |
listProcedures()
List procedures
|
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,
long nonceGroup,
long nonce)
Modify the column descriptor of an existing column in an existing table
|
void |
modifyNamespace(NamespaceDescriptor descriptor,
long nonceGroup,
long nonce)
Modify an existing namespace
|
void |
modifyTable(TableName tableName,
HTableDescriptor descriptor,
long nonceGroup,
long nonce)
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. |
void |
truncateTable(TableName tableName,
boolean preserveSplits,
long nonceGroup,
long nonce)
Truncate a table
|
getChoreService, getConfiguration, getConnection, getCoordinatedStateManager, getMetaTableLocator, getServerName, getZooKeeper
SnapshotManager getSnapshotManager()
MasterProcedureManagerHost getMasterProcedureManagerHost()
AssignmentManager getAssignmentManager()
AssignmentManager
MasterFileSystem getMasterFileSystem()
MasterFileSystem
utility class.ServerManager getServerManager()
ServerManager
instance.ExecutorService getExecutorService()
ExecutorService
TableLockManager getTableLockManager()
TableLockManager
MasterCoprocessorHost getMasterCoprocessorHost()
MasterCoprocessorHost
TableNamespaceManager getTableNamespaceManager()
TableNamespaceManager
MasterQuotaManager getMasterQuotaManager()
MasterQuotaManager
ProcedureExecutor<MasterProcedureEnv> getMasterProcedureExecutor()
ProcedureExecutor
void checkTableModifiable(TableName tableName) throws IOException, TableNotFoundException, TableNotDisabledException
tableName
- Name of table to check.TableNotDisabledException
TableNotFoundException
IOException
long createTable(HTableDescriptor 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(HTableDescriptor hTableDescriptor) throws IOException
hTableDescriptor
- 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
void truncateTable(TableName tableName, boolean preserveSplits, long nonceGroup, long nonce) throws IOException
tableName
- The table namepreserveSplits
- True if the splits should be preservednonceGroup
- nonce
- IOException
void modifyTable(TableName tableName, HTableDescriptor 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
void addColumn(TableName tableName, HColumnDescriptor column, long nonceGroup, long nonce) throws IOException
tableName
- The table namecolumn
- The column definitionnonceGroup
- nonce
- IOException
void modifyColumn(TableName tableName, HColumnDescriptor descriptor, long nonceGroup, long nonce) throws IOException
tableName
- The table namedescriptor
- The updated column definitionnonceGroup
- nonce
- IOException
void deleteColumn(TableName tableName, byte[] columnName, long nonceGroup, long nonce) throws IOException
tableName
- The table namecolumnName
- The column namenonceGroup
- nonce
- IOException
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
otherwisevoid dispatchMergingRegions(HRegionInfo region_a, HRegionInfo region_b, boolean forcible, User user) throws IOException
region_a
- region to mergeregion_b
- region to mergeforcible
- true if do a compulsory merge, otherwise we will only merge
two adjacent regionsuser
- effective userIOException
boolean isInitialized()
void createNamespace(NamespaceDescriptor descriptor, long nonceGroup, long nonce) throws IOException
descriptor
- descriptor which describes the new namespacenonceGroup
- nonce
- IOException
void createNamespaceSync(NamespaceDescriptor descriptor, long nonceGroup, long nonce, boolean executeCoprocessor) throws IOException
descriptor
- descriptor which describes the new namespacenonceGroup
- nonce
- IOException
void modifyNamespace(NamespaceDescriptor descriptor, long nonceGroup, long nonce) throws IOException
descriptor
- descriptor which updates the existing namespacenonceGroup
- nonce
- IOException
void deleteNamespace(String name, long nonceGroup, long nonce) throws IOException
name
- namespace namenonceGroup
- nonce
- IOException
boolean isInMaintenanceMode() throws IOException
IOException
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<ProcedureInfo> listProcedures() throws IOException
IOException
NamespaceDescriptor getNamespaceDescriptor(String name) throws IOException
name
- name of namespace descriptorIOException
List<NamespaceDescriptor> listNamespaceDescriptors() throws IOException
IOException
List<HTableDescriptor> 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
String getRegionServerVersion(ServerName sn)
void checkIfShouldMoveSystemRegionAsync()
LoadBalancer getLoadBalancer()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.