@InterfaceAudience.Private public class TableNamespaceManager extends Object
Modifier and Type | Field and Description |
---|---|
private ConcurrentMap<String,NamespaceDescriptor> |
cache |
(package private) static int |
DEFAULT_NS_INIT_TIMEOUT |
static String |
KEY_MAX_REGIONS |
static String |
KEY_MAX_TABLES |
private MasterServices |
masterServices |
(package private) static String |
NS_INIT_TIMEOUT |
Constructor and Description |
---|
TableNamespaceManager(MasterServices masterServices) |
Modifier and Type | Method and Description |
---|---|
void |
addOrUpdateNamespace(NamespaceDescriptor ns) |
void |
deleteNamespace(String namespaceName) |
boolean |
doesNamespaceExist(String namespaceName)
check whether a namespace has already existed.
|
NamespaceDescriptor |
get(String name) |
static long |
getMaxRegions(NamespaceDescriptor ns) |
static long |
getMaxTables(NamespaceDescriptor ns) |
static void |
insertNamespaceToMeta(Connection conn,
NamespaceDescriptor ns) |
List<NamespaceDescriptor> |
list() |
private void |
loadNamespaceIntoCache() |
private void |
migrateNamespaceTable() |
void |
start() |
void |
validateTableAndRegionCount(NamespaceDescriptor desc) |
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
private final ConcurrentMap<String,NamespaceDescriptor> cache
private final MasterServices masterServices
TableNamespaceManager(MasterServices masterServices)
private void migrateNamespaceTable() throws IOException
IOException
private void loadNamespaceIntoCache() throws IOException
IOException
public void start() throws IOException
IOException
public boolean doesNamespaceExist(String namespaceName) throws IOException
IOException
public NamespaceDescriptor get(String name) throws IOException
IOException
public void addOrUpdateNamespace(NamespaceDescriptor ns) throws IOException
IOException
public static void insertNamespaceToMeta(Connection conn, NamespaceDescriptor ns) throws IOException
IOException
public void deleteNamespace(String namespaceName) throws IOException
IOException
public List<NamespaceDescriptor> list() throws IOException
IOException
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
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.