HDDS-6543. [Merge rocksdb in datanode] BlockDeletingService adaptation for schema v3 containers.#3385
Conversation
|
cc @ChenSammi |
| } | ||
|
|
||
| @SuppressWarnings("checkstyle:parameternumber") | ||
| private void createPendingDeleteBlocksSchema3(int numOfBlocksPerContainer, |
There was a problem hiding this comment.
Looks like createPendingDeleteBlocksSchema3 and createPendingDeleteBlocksSchema2 are identical.
There was a problem hiding this comment.
Yes, it is, here I just intend to keep the schema check style of function in createToDeleteBlocks aligned, but I could remove one of the identical functions and use the lower level function directly when we have schema v2 || v3.
| private interface Deleter { | ||
| void apply(Table<?, DeletedBlocksTransaction> deleteTxnsTable, | ||
| BatchOperation batch, long txnID) | ||
| throws IOException; |
There was a problem hiding this comment.
L553 and L553 can be merged into one line.
There was a problem hiding this comment.
Sure, I'll merge it.
| */ | ||
| public class DatanodeStoreSchemaThreeImpl extends AbstractDatanodeStore { | ||
| public class DatanodeStoreSchemaThreeImpl extends AbstractDatanodeStore | ||
| implements DeleteTransactionStore<String> { |
There was a problem hiding this comment.
"Rename dropAllWithPrefix to removeContainerFromDB". Change is missed from last patch.
There was a problem hiding this comment.
Ah, I think I just renamed the helper function in BlockUtils but not the one in DatanodeStoreSchemaThreeImpl.
I think we could use a slightly different name like removeKVContainerData, because I found a existing name for those KV pairs for container: KeyValueContainerUtil.parseKVContainerData().
And I'll add dumpKVContainerDataXXX and loadKVContainerDataXXX in the next patch for container export and import.
|
Thanks @guihecheng, the patch overall looks good. |
|
+1. |
What changes were proposed in this pull request?
BlockDeletingService adaptation for schema v3 containers.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6543
How was this patch tested?
turned on previously ignored UT for schema v3.