@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
IOException
private Table getNamespaceTable() throws IOException
IOException
public boolean doesNamespaceExist(String namespaceName) throws IOException
IOException
public NamespaceDescriptor get(String name) throws IOException
IOException
private NamespaceDescriptor get(Table table, String name) throws IOException
IOException
public void insertIntoNSTable(NamespaceDescriptor ns) throws IOException
IOException
public void updateZKNamespaceManager(NamespaceDescriptor ns) throws IOException
IOException
public void removeFromNSTable(String namespaceName) throws IOException
IOException
public void removeFromZKNamespaceManager(String namespaceName) throws IOException
IOException
public NavigableSet<NamespaceDescriptor> list() throws IOException
IOException
private void createNamespaceTable(MasterServices masterServices) throws IOException
IOException
private boolean isTableNamespaceManagerInitialized() throws IOException
IOException
private 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.IOException
private static void block(MasterServices services, long procId) throws TimeoutIOException
TimeoutIOException
public boolean isTableAvailableAndInitialized() throws IOException
IOException
private TableState getTableState() throws IOException
IOException
private boolean isTableEnabled() throws IOException
IOException
private boolean isTableAssigned()
public void validateTableAndRegionCount(NamespaceDescriptor desc) throws IOException
IOException
public static long getMaxTables(NamespaceDescriptor ns) throws IOException
IOException
public static long getMaxRegions(NamespaceDescriptor ns) throws IOException
IOException
public boolean isStopped()
isStopped
in interface Stoppable
Stoppable.stop(String)
has been closed.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.