@InterfaceAudience.Private public interface TableDescriptors extends Closeable
| Modifier and Type | Method and Description |
|---|---|
default void |
close() |
default boolean |
exists(TableName tableName)
Test whether a given table exists, i.e, has a table descriptor.
|
TableDescriptor |
get(TableName 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) |
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
IOExceptiondefault void close()
throws IOException
close in interface AutoCloseableclose in interface CloseableIOExceptionTableDescriptor get(TableName tableName) throws IOException
IOExceptionMap<String,TableDescriptor> getByNamespace(String name) throws IOException
IOExceptionMap<String,TableDescriptor> getAll() throws IOException
TableName.getNameWithNamespaceInclAsString().IOExceptiondefault void update(TableDescriptor htd) throws IOException
IOExceptionvoid 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.IOExceptionTableDescriptor remove(TableName tablename) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.