You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ad...@apache.org on 2023/11/13 16:41:56 UTC
(ozone) branch master updated: HDDS-9677. Reuse SCMDBDefinition instance in SCMMetadataStoreImpl#start() (#5587)
This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 4e95b702a9 HDDS-9677. Reuse SCMDBDefinition instance in SCMMetadataStoreImpl#start() (#5587)
4e95b702a9 is described below
commit 4e95b702a996ec65f9be6f4d50a4025e55991d89
Author: jianghuazhu <74...@qq.com>
AuthorDate: Mon Nov 13 10:41:50 2023 -0600
HDDS-9677. Reuse SCMDBDefinition instance in SCMMetadataStoreImpl#start() (#5587)
---
.../org/apache/hadoop/hdds/scm/metadata/SCMMetadataStoreImpl.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/metadata/SCMMetadataStoreImpl.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/metadata/SCMMetadataStoreImpl.java
index d8f5036ae7..cbff9527bb 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/metadata/SCMMetadataStoreImpl.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/metadata/SCMMetadataStoreImpl.java
@@ -120,8 +120,8 @@ public class SCMMetadataStoreImpl implements SCMMetadataStore {
public void start(OzoneConfiguration config)
throws IOException {
if (this.store == null) {
-
- File metaDir = HAUtils.getMetaDir(new SCMDBDefinition(), configuration);
+ SCMDBDefinition scmdbDefinition = new SCMDBDefinition();
+ File metaDir = HAUtils.getMetaDir(scmdbDefinition, configuration);
// Check if there is a DB Inconsistent Marker in the metaDir. This
// marker indicates that the DB is in an inconsistent state and hence
// the OM process should be terminated.
@@ -137,8 +137,7 @@ public class SCMMetadataStoreImpl implements SCMMetadataStore {
ExitUtils.terminate(1, errorMsg, LOG);
}
-
- this.store = DBStoreBuilder.createDBStore(config, new SCMDBDefinition());
+ this.store = DBStoreBuilder.createDBStore(config, scmdbDefinition);
deletedBlocksTable =
DELETED_BLOCKS.getTable(this.store);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org