Class AbstractDatanodeStore

java.lang.Object
org.apache.hadoop.ozone.container.metadata.AbstractRDBStore<AbstractDatanodeDBDefinition>
org.apache.hadoop.ozone.container.metadata.AbstractDatanodeStore
All Implemented Interfaces:
AutoCloseable, DatanodeStore, DBStoreManager, org.apache.ratis.util.UncheckedAutoCloseable
Direct Known Subclasses:
DatanodeStoreSchemaOneImpl, DatanodeStoreWithIncrementalChunkList

public class AbstractDatanodeStore extends AbstractRDBStore<AbstractDatanodeDBDefinition> implements DatanodeStore
Implementation of the DatanodeStore interface that contains functionality common to all more derived datanode store implementations.
  • Field Details

    • LOG

      protected static final org.slf4j.Logger LOG
  • Constructor Details

    • AbstractDatanodeStore

      protected AbstractDatanodeStore(org.apache.hadoop.hdds.conf.ConfigurationSource config, AbstractDatanodeDBDefinition dbDef, boolean openReadOnly) throws org.apache.hadoop.hdds.utils.db.RocksDatabaseException, org.apache.hadoop.hdds.utils.db.CodecException
      Constructs the metadata store and starts the DB services.
      Parameters:
      config - - Ozone Configuration.
      Throws:
      org.apache.hadoop.hdds.utils.db.RocksDatabaseException
      org.apache.hadoop.hdds.utils.db.CodecException
  • Method Details

    • initDBStore

      protected org.apache.hadoop.hdds.utils.db.DBStore initDBStore(org.apache.hadoop.hdds.utils.db.DBStoreBuilder dbStoreBuilder, org.apache.hadoop.hdds.utils.db.managed.ManagedDBOptions options, org.apache.hadoop.hdds.conf.ConfigurationSource config) throws org.apache.hadoop.hdds.utils.db.RocksDatabaseException, org.apache.hadoop.hdds.utils.db.CodecException
      Specified by:
      initDBStore in class AbstractRDBStore<AbstractDatanodeDBDefinition>
      Throws:
      org.apache.hadoop.hdds.utils.db.RocksDatabaseException
      org.apache.hadoop.hdds.utils.db.CodecException
    • getMetadataTable

      public org.apache.hadoop.hdds.utils.db.Table<String,Long> getMetadataTable()
      Description copied from interface: DatanodeStore
      A Table that keeps the metadata.
      Specified by:
      getMetadataTable in interface DatanodeStore
      Returns:
      Table
    • getBlockDataTable

      public org.apache.hadoop.hdds.utils.db.Table<String,org.apache.hadoop.ozone.container.common.helpers.BlockData> getBlockDataTable()
      Description copied from interface: DatanodeStore
      A Table that keeps the block data.
      Specified by:
      getBlockDataTable in interface DatanodeStore
      Returns:
      Table
    • getLastChunkInfoTable

      public org.apache.hadoop.hdds.utils.db.Table<String,org.apache.hadoop.ozone.container.common.helpers.BlockData> getLastChunkInfoTable()
      Description copied from interface: DatanodeStore
      A Table that keeps the metadata of the last chunk of blocks.
      Specified by:
      getLastChunkInfoTable in interface DatanodeStore
      Returns:
      Table
    • getDeletedBlocksTable

      public org.apache.hadoop.hdds.utils.db.Table<String,org.apache.hadoop.ozone.container.common.helpers.ChunkInfoList> getDeletedBlocksTable()
      Description copied from interface: DatanodeStore
      A Table that keeps IDs of blocks deleted from the block data table.
      Specified by:
      getDeletedBlocksTable in interface DatanodeStore
      Returns:
      Table
    • getFinalizeBlocksTable

      public org.apache.hadoop.hdds.utils.db.Table<String,Long> getFinalizeBlocksTable()
      Description copied from interface: DatanodeStore
      A Table that keeps finalize blocks requested from client.
      Specified by:
      getFinalizeBlocksTable in interface DatanodeStore
      Returns:
      Table
    • getBlockIterator

      public BlockIterator<org.apache.hadoop.ozone.container.common.helpers.BlockData> getBlockIterator(long containerID) throws IOException
      Specified by:
      getBlockIterator in interface DatanodeStore
      Throws:
      IOException
    • getBlockIterator

      public BlockIterator<org.apache.hadoop.ozone.container.common.helpers.BlockData> getBlockIterator(long containerID, org.apache.hadoop.hdds.utils.MetadataKeyFilters.KeyPrefixFilter filter) throws IOException
      Specified by:
      getBlockIterator in interface DatanodeStore
      Throws:
      IOException
    • getFinalizeBlockIterator

      public BlockIterator<Long> getFinalizeBlockIterator(long containerID, org.apache.hadoop.hdds.utils.MetadataKeyFilters.KeyPrefixFilter filter) throws IOException
      Specified by:
      getFinalizeBlockIterator in interface DatanodeStore
      Throws:
      IOException
    • getBlockDataTableWithIterator

      protected org.apache.hadoop.hdds.utils.db.Table<String,org.apache.hadoop.ozone.container.common.helpers.BlockData> getBlockDataTableWithIterator()
    • getFinalizeBlocksTableWithIterator

      protected org.apache.hadoop.hdds.utils.db.Table<String,Long> getFinalizeBlocksTableWithIterator()