Package org.apache.hadoop.hbase
Interface TableDescriptors
- All Known Implementing Classes:
FSTableDescriptors
Get, remove and modify table descriptors.
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Test whether a given table exists, i.e, has a table descriptor.Returns TableDescriptor for tablenamegetAll()
Get Map of all TableDescriptors.getByNamespace
(String name) Get Map of all NamespaceDescriptors for a given namespace.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
-
Method Details
-
exists
Test whether a given table exists, i.e, has a table descriptor.- Throws:
IOException
-
get
Returns TableDescriptor for tablename- Throws:
IOException
-
getByNamespace
Get Map of all NamespaceDescriptors for a given namespace.- Returns:
- Map of all descriptors.
- Throws:
IOException
-
getAll
Get Map of all TableDescriptors. Populates the descriptor cache as a side effect. Notice: the key of map is the table name which contains namespace. It was generated byTableName.getNameWithNamespaceInclAsString()
.- Returns:
- Map of all descriptors.
- Throws:
IOException
-
update
- Throws:
IOException
-
update
Add or update descriptor- Parameters:
htd
- Descriptor to set into TableDescriptorscacheOnly
- only add the givenhtd
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.- Throws:
IOException
-
remove
Returns Instance of table descriptor or null if none found.- Throws:
IOException
-