@InterfaceAudience.Private public class TableNamespaceManager extends Object implements Stoppable
ZKNamespaceManager.
WARNING: Do not use. Go via the higher-level ClusterSchema API instead. This manager
is likely to go aways anyways.| Modifier and Type | Field and Description |
|---|---|
private org.apache.hadoop.conf.Configuration |
conf |
(package private) static int |
DEFAULT_NS_INIT_TIMEOUT |
private boolean |
initialized |
static String |
KEY_MAX_REGIONS |
static String |
KEY_MAX_TABLES |
private static org.slf4j.Logger |
LOG |
private MasterServices |
masterServices |
(package private) static String |
NS_INIT_TIMEOUT |
private Table |
nsTable |
private boolean |
stopped |
private ZKNamespaceManager |
zkNamespaceManager |
| Constructor and Description |
|---|
TableNamespaceManager(MasterServices masterServices) |
| Modifier and Type | Method and Description |
|---|---|
private static void |
block(MasterServices services,
long procId)
An ugly utility to be removed when refactor TableNamespaceManager.
|
private void |
blockingCreateNamespace(NamespaceDescriptor namespaceDescriptor)
Create Namespace in a blocking manner.
|
private void |
createNamespaceTable(MasterServices masterServices) |
boolean |
doesNamespaceExist(String namespaceName) |
NamespaceDescriptor |
get(String name) |
private NamespaceDescriptor |
get(Table table,
String name) |
static long |
getMaxRegions(NamespaceDescriptor ns) |
static long |
getMaxTables(NamespaceDescriptor ns) |
private Table |
getNamespaceTable() |
private TableState |
getTableState() |
void |
insertIntoNSTable(NamespaceDescriptor ns) |
boolean |
isStopped() |
private boolean |
isTableAssigned() |
boolean |
isTableAvailableAndInitialized()
This method checks if the namespace table is assigned and then
tries to create its Table reference.
|
private boolean |
isTableEnabled() |
private boolean |
isTableNamespaceManagerInitialized() |
NavigableSet<NamespaceDescriptor> |
list() |
void |
removeFromNSTable(String namespaceName) |
void |
removeFromZKNamespaceManager(String namespaceName) |
void |
start() |
void |
stop(String why)
Stop this service.
|
void |
updateZKNamespaceManager(NamespaceDescriptor ns) |
void |
validateTableAndRegionCount(NamespaceDescriptor desc) |
private static final org.slf4j.Logger LOG
private volatile boolean stopped
private org.apache.hadoop.conf.Configuration conf
private MasterServices masterServices
private ZKNamespaceManager zkNamespaceManager
private boolean initialized
public static final String KEY_MAX_REGIONS
public static final String KEY_MAX_TABLES
static final String NS_INIT_TIMEOUT
static final int DEFAULT_NS_INIT_TIMEOUT
TableNamespaceManager(MasterServices masterServices)
public void start() throws IOException
IOExceptionprivate Table getNamespaceTable() throws IOException
IOExceptionpublic boolean doesNamespaceExist(String namespaceName) throws IOException
IOExceptionpublic NamespaceDescriptor get(String name) throws IOException
IOExceptionprivate NamespaceDescriptor get(Table table, String name) throws IOException
IOExceptionpublic void insertIntoNSTable(NamespaceDescriptor ns) throws IOException
IOExceptionpublic void updateZKNamespaceManager(NamespaceDescriptor ns) throws IOException
IOExceptionpublic void removeFromNSTable(String namespaceName) throws IOException
IOExceptionpublic void removeFromZKNamespaceManager(String namespaceName) throws IOException
IOExceptionpublic NavigableSet<NamespaceDescriptor> list() throws IOException
IOExceptionprivate void createNamespaceTable(MasterServices masterServices) throws IOException
IOExceptionprivate boolean isTableNamespaceManagerInitialized() throws IOException
IOExceptionprivate void blockingCreateNamespace(NamespaceDescriptor namespaceDescriptor) throws IOException
ClusterSchema.HBASE_MASTER_CLUSTER_SCHEMA_OPERATION_TIMEOUT_KEY expires.
Note, by-passes notifying coprocessors and name checks. Use for system namespaces only.IOExceptionprivate static void block(MasterServices services, long procId) throws TimeoutIOException
TimeoutIOExceptionpublic boolean isTableAvailableAndInitialized() throws IOException
IOExceptionprivate TableState getTableState() throws IOException
IOExceptionprivate boolean isTableEnabled() throws IOException
IOExceptionprivate boolean isTableAssigned()
public void validateTableAndRegionCount(NamespaceDescriptor desc) throws IOException
IOExceptionpublic static long getMaxTables(NamespaceDescriptor ns) throws IOException
IOExceptionpublic static long getMaxRegions(NamespaceDescriptor ns) throws IOException
IOExceptionpublic boolean isStopped()
isStopped in interface StoppableStoppable.stop(String) has been closed.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.