Interface DBStoreManager
- All Superinterfaces:
AutoCloseable,org.apache.ratis.util.UncheckedAutoCloseable
- All Known Subinterfaces:
DatanodeStore,WitnessedContainerMetadataStore
- All Known Implementing Classes:
AbstractDatanodeStore,AbstractRDBStore,DatanodeStoreSchemaOneImpl,DatanodeStoreSchemaThreeImpl,DatanodeStoreSchemaTwoImpl,DatanodeStoreWithIncrementalChunkList,WitnessedContainerMetadataStoreImpl
public interface DBStoreManager
extends org.apache.ratis.util.UncheckedAutoCloseable
Interface for interacting with datanode databases.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddefault voidvoidflushDB()voidflushLog(boolean sync) org.apache.hadoop.hdds.utils.db.BatchOperationHandlerHelper to create and write batch transactions.org.apache.hadoop.hdds.utils.db.DBStoregetStore()Get datanode store.booleanisClosed()Returns if the underlying DB is closed.voidstop()Stop datanode manager.Methods inherited from interface org.apache.ratis.util.UncheckedAutoCloseable
close
-
Method Details
-
stop
void stop()Stop datanode manager. -
getStore
org.apache.hadoop.hdds.utils.db.DBStore getStore()Get datanode store.- Returns:
- datanode store.
-
getBatchHandler
org.apache.hadoop.hdds.utils.db.BatchOperationHandler getBatchHandler()Helper to create and write batch transactions. -
flushLog
- Throws:
IOException
-
flushDB
- Throws:
IOException
-
compactDB
- Throws:
IOException
-
isClosed
boolean isClosed()Returns if the underlying DB is closed. This call is thread safe.- Returns:
- true if the DB is closed.
-
compactionIfNeeded
- Throws:
Exception
-