Interface DatanodeStore
- All Superinterfaces:
AutoCloseable,DBStoreManager,org.apache.ratis.util.UncheckedAutoCloseable
- All Known Implementing Classes:
AbstractDatanodeStore,DatanodeStoreSchemaOneImpl,DatanodeStoreSchemaThreeImpl,DatanodeStoreSchemaTwoImpl,DatanodeStoreWithIncrementalChunkList
Interface for interacting with datanode databases.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault org.apache.hadoop.ozone.container.common.helpers.BlockDatagetBlockByID(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.BlockDatagetCompleteBlockData(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) 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.A Table that keeps the metadata.default voidputBlockByID(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, stopMethods inherited from interface org.apache.ratis.util.UncheckedAutoCloseable
close
-
Field Details
-
NO_SUCH_BLOCK_ERR_MSG
- See Also:
-
-
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
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
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
-