@InterfaceAudience.Private public interface TableDescriptors
Modifier and Type | Method and Description |
---|---|
default boolean |
exists(TableName tableName)
Test whether a given table exists, i.e, has a table descriptor.
|
TableDescriptor |
get(TableName tableName)
Returns TableDescriptor for tablename
|
Map<String,TableDescriptor> |
getAll()
Get Map of all TableDescriptors.
|
Map<String,TableDescriptor> |
getByNamespace(String name)
Get Map of all NamespaceDescriptors for a given namespace.
|
TableDescriptor |
remove(TableName tablename)
Returns Instance of table descriptor or null if none found.
|
default void |
update(TableDescriptor htd)
Add or update descriptor.
|
void |
update(TableDescriptor htd,
boolean cacheOnly)
Add or update descriptor
|
default boolean exists(TableName tableName) throws IOException
IOException
TableDescriptor get(TableName tableName) throws IOException
IOException
Map<String,TableDescriptor> getByNamespace(String name) throws IOException
IOException
Map<String,TableDescriptor> getAll() throws IOException
TableName.getNameWithNamespaceInclAsString()
.IOException
default void update(TableDescriptor htd) throws IOException
IOException
void update(TableDescriptor htd, boolean cacheOnly) throws IOException
htd
- Descriptor to set into TableDescriptorscacheOnly
- only add the given htd
to cache, without updating the storage. For
example, when creating table, we will write the descriptor to fs when creating
the fs layout, so we do not need to update the fs again.IOException
TableDescriptor remove(TableName tablename) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.