Interface DatanodeStore

All Superinterfaces:
AutoCloseable, DBStoreManager, org.apache.ratis.util.UncheckedAutoCloseable
All Known Implementing Classes:
AbstractDatanodeStore, DatanodeStoreSchemaOneImpl, DatanodeStoreSchemaThreeImpl, DatanodeStoreSchemaTwoImpl, DatanodeStoreWithIncrementalChunkList

public interface DatanodeStore extends DBStoreManager
Interface for interacting with datanode databases.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default org.apache.hadoop.ozone.container.common.helpers.BlockData
    getBlockByID(org.apache.hadoop.hdds.client.BlockID blockID, String blockKey)
     
    org.apache.hadoop.hdds.utils.db.Table<String,org.apache.hadoop.ozone.container.common.helpers.BlockData>
    A Table that keeps the block data.
    BlockIterator<org.apache.hadoop.ozone.container.common.helpers.BlockData>
    getBlockIterator(long containerID)
     
    BlockIterator<org.apache.hadoop.ozone.container.common.helpers.BlockData>
    getBlockIterator(long containerID, org.apache.hadoop.hdds.utils.MetadataKeyFilters.KeyPrefixFilter filter)
     
    default org.apache.hadoop.ozone.container.common.helpers.BlockData
    getCompleteBlockData(org.apache.hadoop.ozone.container.common.helpers.BlockData blockData, org.apache.hadoop.hdds.client.BlockID blockID, String blockKey)
     
    org.apache.hadoop.hdds.utils.db.Table<String,org.apache.hadoop.ozone.container.common.helpers.ChunkInfoList>
    A Table that keeps IDs of blocks deleted from the block data table.
    getFinalizeBlockIterator(long containerID, org.apache.hadoop.hdds.utils.MetadataKeyFilters.KeyPrefixFilter filter)
     
    org.apache.hadoop.hdds.utils.db.Table<String,Long>
    A Table that keeps finalize blocks requested from client.
    org.apache.hadoop.hdds.utils.db.Table<String,org.apache.hadoop.ozone.container.common.helpers.BlockData>
    A Table that keeps the metadata of the last chunk of blocks.
    org.apache.hadoop.hdds.utils.db.Table<String,Long>
    A Table that keeps the metadata.
    default void
    putBlockByID(org.apache.hadoop.hdds.utils.db.BatchOperation batch, boolean incremental, long localID, org.apache.hadoop.ozone.container.common.helpers.BlockData data, KeyValueContainerData containerData, boolean endOfBlock)
     

    Methods inherited from interface org.apache.hadoop.ozone.container.metadata.DBStoreManager

    compactDB, compactionIfNeeded, flushDB, flushLog, getBatchHandler, getStore, isClosed, stop

    Methods inherited from interface org.apache.ratis.util.UncheckedAutoCloseable

    close
  • Field Details

  • Method Details

    • getBlockDataTable

      org.apache.hadoop.hdds.utils.db.Table<String,org.apache.hadoop.ozone.container.common.helpers.BlockData> getBlockDataTable()
      A Table that keeps the block data.
      Returns:
      Table
    • getMetadataTable

      org.apache.hadoop.hdds.utils.db.Table<String,Long> getMetadataTable()
      A Table that keeps the metadata.
      Returns:
      Table
    • getDeletedBlocksTable

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

      org.apache.hadoop.hdds.utils.db.Table<String,Long> getFinalizeBlocksTable()
      A Table that keeps finalize blocks requested from client.
      Returns:
      Table
    • getLastChunkInfoTable

      org.apache.hadoop.hdds.utils.db.Table<String,org.apache.hadoop.ozone.container.common.helpers.BlockData> getLastChunkInfoTable()
      A Table that keeps the metadata of the last chunk of blocks.
      Returns:
      Table
    • getBlockIterator

      BlockIterator<org.apache.hadoop.ozone.container.common.helpers.BlockData> getBlockIterator(long containerID) throws IOException
      Throws:
      IOException
    • getBlockIterator

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

      BlockIterator<Long> getFinalizeBlockIterator(long containerID, org.apache.hadoop.hdds.utils.MetadataKeyFilters.KeyPrefixFilter filter) throws IOException
      Throws:
      IOException
    • getBlockByID

      default org.apache.hadoop.ozone.container.common.helpers.BlockData getBlockByID(org.apache.hadoop.hdds.client.BlockID blockID, String blockKey) throws IOException
      Throws:
      IOException
    • getCompleteBlockData

      default org.apache.hadoop.ozone.container.common.helpers.BlockData getCompleteBlockData(org.apache.hadoop.ozone.container.common.helpers.BlockData blockData, org.apache.hadoop.hdds.client.BlockID blockID, String blockKey) throws IOException
      Throws:
      IOException
    • putBlockByID

      default void putBlockByID(org.apache.hadoop.hdds.utils.db.BatchOperation batch, boolean incremental, long localID, org.apache.hadoop.ozone.container.common.helpers.BlockData data, KeyValueContainerData containerData, boolean endOfBlock) throws IOException
      Throws:
      IOException