[
https://issues.apache.org/jira/browse/HDDS-3479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marton Elek updated HDDS-3479:
------------------------------
Description:
Suggested by Nanda in https://github.com/apache/hadoop-ozone/pull/700
Context: we have a low-level DBStoreBuilder with separated DB definition
(SCMDBDefinition). But as we have a higher level wrapper class
(scmMetadataStore) It seems to be more reasonable to use ScmMetadataStore
everywhere inside SCM
(Currently It's called SCMMetadataStoreRDBImpl but it's proposed to remove
R(DB) from the name as it's no more RocksDB specific)
bq. If we are going with renaming and using it, it's better to use
SCMMetadataStoreRDBImpl in all the places rather than
DBStoreBuilder.createDBStore(conf, new SCMDBDefinition()
bq.
Instead of this:
{code}
DBStore dbStore = DBStoreBuilder.createDBStore(conf, new SCMDBDefinition());
Table<PipelineID, Pipeline> pipelineTable =
SCMDBDefinition.PIPELINES.getTable(dbStore);
dbStore.close();
{code}
we can use this:
{code}
SCMMetadataStore scmMetadataStore = new SCMMetadataStoreRDBImpl(conf);
Table<PipelineID, Pipeline> pipelineTable = scmMetadataStore.getPipelineTable();
scmMetadataStore.close();
{code}
was:
Suggested by Nanda in https://github.com/apache/hadoop-ozone/pull/700
Context: we have a low-level DBStoreBuilder with separated DB definition
(SCMDBDefinition). But as we have a higher level wrapper class
(scmMetadataStore) It seems to be more reasonable to use ScmMetadataStore
everywhere inside SCM
(Currently It's called SCMMetadataStoreRDBImpl but it's proposed to remove R
from the name as it's no more RocksDB specific)
bq. If we are going with renaming and using it, it's better to use
SCMMetadataStoreRDBImpl in all the places rather than
DBStoreBuilder.createDBStore(conf, new SCMDBDefinition()
bq.
Instead of this:
{code}
DBStore dbStore = DBStoreBuilder.createDBStore(conf, new SCMDBDefinition());
Table<PipelineID, Pipeline> pipelineTable =
SCMDBDefinition.PIPELINES.getTable(dbStore);
dbStore.close();
{code}
we can use this:
{code}
SCMMetadataStore scmMetadataStore = new SCMMetadataStoreRDBImpl(conf);
Table<PipelineID, Pipeline> pipelineTable = scmMetadataStore.getPipelineTable();
scmMetadataStore.close();
{code}
> Use SCMMetadataStore instead of low level DBStore
> -------------------------------------------------
>
> Key: HDDS-3479
> URL: https://issues.apache.org/jira/browse/HDDS-3479
> Project: Hadoop Distributed Data Store
> Issue Type: Improvement
> Reporter: Marton Elek
> Priority: Major
> Labels: newbie
>
> Suggested by Nanda in https://github.com/apache/hadoop-ozone/pull/700
> Context: we have a low-level DBStoreBuilder with separated DB definition
> (SCMDBDefinition). But as we have a higher level wrapper class
> (scmMetadataStore) It seems to be more reasonable to use ScmMetadataStore
> everywhere inside SCM
> (Currently It's called SCMMetadataStoreRDBImpl but it's proposed to remove
> R(DB) from the name as it's no more RocksDB specific)
> bq. If we are going with renaming and using it, it's better to use
> SCMMetadataStoreRDBImpl in all the places rather than
> DBStoreBuilder.createDBStore(conf, new SCMDBDefinition()
> bq.
> Instead of this:
> {code}
> DBStore dbStore = DBStoreBuilder.createDBStore(conf, new SCMDBDefinition());
> Table<PipelineID, Pipeline> pipelineTable =
> SCMDBDefinition.PIPELINES.getTable(dbStore);
> dbStore.close();
> {code}
> we can use this:
> {code}
> SCMMetadataStore scmMetadataStore = new SCMMetadataStoreRDBImpl(conf);
> Table<PipelineID, Pipeline> pipelineTable =
> scmMetadataStore.getPipelineTable();
> scmMetadataStore.close();
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]