@InterfaceAudience.Private public class TableNamespaceManager extends Object
ZKNamespaceManager| 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.apache.commons.logging.Log |
LOG |
private MasterServices |
masterServices |
(package private) static String |
NS_INIT_TIMEOUT |
private Table |
nsTable |
private ZKNamespaceManager |
zkNamespaceManager |
| Constructor and Description |
|---|
TableNamespaceManager(MasterServices masterServices) |
| Modifier and Type | Method and Description |
|---|---|
void |
create(NamespaceDescriptor ns) |
private void |
create(Table table,
NamespaceDescriptor ns) |
private void |
createNamespaceTable(MasterServices masterServices) |
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 boolean |
isTableAssigned() |
boolean |
isTableAvailableAndInitialized()
This method checks if the namespace table is assigned and then
tries to create its HTable.
|
NavigableSet<NamespaceDescriptor> |
list() |
void |
remove(String name) |
void |
start() |
void |
update(NamespaceDescriptor ns) |
private void |
upsert(Table table,
NamespaceDescriptor ns) |
(package private) void |
validateTableAndRegionCount(NamespaceDescriptor desc) |
private static final org.apache.commons.logging.Log LOG
private org.apache.hadoop.conf.Configuration conf
private MasterServices masterServices
private Table nsTable
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
public TableNamespaceManager(MasterServices masterServices)
public void start()
throws IOException
IOExceptionprivate Table getNamespaceTable() throws IOException
IOExceptionpublic NamespaceDescriptor get(String name) throws IOException
IOExceptionpublic void create(NamespaceDescriptor ns) throws IOException
IOExceptionpublic void update(NamespaceDescriptor ns) throws IOException
IOExceptionprivate NamespaceDescriptor get(Table table, String name) throws IOException
IOExceptionprivate void create(Table table, NamespaceDescriptor ns) throws IOException
IOExceptionprivate void upsert(Table table, NamespaceDescriptor ns) throws IOException
IOExceptionpublic void remove(String name) throws IOException
IOExceptionpublic NavigableSet<NamespaceDescriptor> list() throws IOException
IOExceptionprivate void createNamespaceTable(MasterServices masterServices) throws IOException
IOExceptionpublic boolean isTableAvailableAndInitialized()
throws IOException
IOExceptionprivate boolean isTableAssigned()
void validateTableAndRegionCount(NamespaceDescriptor desc) throws IOException
IOExceptionpublic static long getMaxTables(NamespaceDescriptor ns) throws IOException
IOExceptionpublic static long getMaxRegions(NamespaceDescriptor ns) throws IOException
IOExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.