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 Type
    Method
    Description
    void
     
    default void
     
    void
     
    void
    flushLog(boolean sync)
     
    org.apache.hadoop.hdds.utils.db.BatchOperationHandler
    Helper to create and write batch transactions.
    org.apache.hadoop.hdds.utils.db.DBStore
    Get datanode store.
    boolean
    Returns if the underlying DB is closed.
    void
    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

      void flushLog(boolean sync) throws IOException
      Throws:
      IOException
    • flushDB

      void flushDB() throws IOException
      Throws:
      IOException
    • compactDB

      void compactDB() throws IOException
      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

      default void compactionIfNeeded() throws Exception
      Throws:
      Exception