-
Notifications
You must be signed in to change notification settings - Fork 587
HDDS-3172. Use DBStore instead of MetadataStore in SCM #700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
90eee2c to
f3e4ac2
Compare
avijayanhwx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elek Thank you for working in this involved patch. A few comments inline.
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconNodeManager.java
Show resolved
Hide resolved
...econ/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconStorageContainerManagerFacade.java
Outdated
Show resolved
Hide resolved
nandakumar131
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the change looks good to me. Few minor clarifications/comments.
DBDefinitionis a generic interface which should not have anything specific to particular db. It's usingDBStoreBuilderwhich is specific to rocksdb.SCMMetadataStoreRDBImplis no more a rocksdb specific implementation. We can do the rename/removal in follow-up jira.- I know there is a plan to refactor datanode part, is there a plan to re-write OMDBStore to follow this new model of
DBDefinition?
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/metadata/SCMDBDefinition.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/block/TestBlockManager.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/block/TestBlockManager.java
Outdated
Show resolved
Hide resolved
...dds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestSCMPipelineManager.java
Outdated
Show resolved
Hide resolved
…m/block/TestBlockManager.java Co-Authored-By: Nandakumar <[email protected]>
|
Thanks @nandakumar131 the review:
Good point, I didn't notice it. And definition of the format and the creation logic were mixed in the new I pushed a new commit (d745282) where all the creation logic is moved to the
Yes. Agree. Do you prefer rename or removal? I am not sure if it's required or not.
Yes. I have two motivation:
Not sure. Some of the code uses I created a commit in this PR to show how can it work (26c8a58) check the usage of |
|
Thanks @elek for updating the patch.
I'm leaning more towards renaming and using it, as it will give us easy to use API. Instead of this: we can use this:
+1 on fixing ozone sql tool |
I like the idea. Created an issue for this: https://issues.apache.org/jira/browse/HDDS-3479 Marked as newbie but if it won't be picked up by anybody in the next weeks I will do it quickly. Thanks the review again, will merge it soon. |
What changes were proposed in this pull request?
Description
The MetadataStore interface provides a generic view to any key / value store with a LevelDB and RocksDB implementation.
Since the early version of MetadataStore we also go the DBStore interface which is more andvanced (it supports DB profiles and ColumnFamilies).
To simplify the introduction of new features (like versioning or rocksdb tuning) we should use the new interface everywhere instead of the old interface.
We should update SCM and Datanode to use the DBStore instead of MetadataStore.
This patch is the first part of the cleanup it starts to use DBStore in SCM.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-3172
How was this patch tested?
Execution full integration test suite.