You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by na...@apache.org on 2020/12/02 15:26:40 UTC
[ozone] branch HDDS-2823 updated: HDDS-4538: Workaround on
HDDS-2823, hard code scmUuid and clusterID. (#1649)
This is an automated email from the ASF dual-hosted git repository.
nanda pushed a commit to branch HDDS-2823
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/HDDS-2823 by this push:
new 48b9809 HDDS-4538: Workaround on HDDS-2823, hard code scmUuid and clusterID. (#1649)
48b9809 is described below
commit 48b980904205823259393d5b521e6a3c1d046898
Author: GlenGeng <gl...@tencent.com>
AuthorDate: Wed Dec 2 23:26:20 2020 +0800
HDDS-4538: Workaround on HDDS-2823, hard code scmUuid and clusterID. (#1649)
---
.../src/main/java/org/apache/hadoop/ozone/common/StorageInfo.java | 7 +++++--
.../java/org/apache/hadoop/hdds/scm/server/SCMStorageConfig.java | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/StorageInfo.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/StorageInfo.java
index 55911fc..c88aaa9 100644
--- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/StorageInfo.java
+++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/StorageInfo.java
@@ -27,7 +27,6 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.util.Properties;
-import java.util.UUID;
/**
* Common class for storage information. This class defines the common
@@ -198,7 +197,11 @@ public class StorageInfo {
* @return new clusterID
*/
public static String newClusterID() {
- return "CID-" + UUID.randomUUID().toString();
+ // TODO:
+ // Please check https://issues.apache.org/jira/browse/HDDS-4538
+ // hard code clusterID and scmUuid on HDDS-2823,
+ // so that multi SCMs won't cause chaos in Datanode side.
+ return "CID-1df51ed9-19f1-4283-8f61-5d90a84c196c";
}
}
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMStorageConfig.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMStorageConfig.java
index a628279..fab33b5 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMStorageConfig.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMStorageConfig.java
@@ -25,7 +25,6 @@ import org.apache.hadoop.ozone.common.Storage;
import java.io.File;
import java.io.IOException;
import java.util.Properties;
-import java.util.UUID;
import static org.apache.hadoop.ozone.OzoneConsts.SCM_ID;
import static org.apache.hadoop.ozone.OzoneConsts.STORAGE_DIR;
@@ -69,7 +68,11 @@ public class SCMStorageConfig extends Storage {
protected Properties getNodeProperties() {
String scmId = getScmId();
if (scmId == null) {
- scmId = UUID.randomUUID().toString();
+ // TODO:
+ // Please check https://issues.apache.org/jira/browse/HDDS-4538
+ // hard code clusterID and scmUuid on HDDS-2823,
+ // so that multi SCMs won't cause chaos in Datanode side.
+ scmId = "3a11fedb-cce5-46ac-bb0d-cfdf17df9a19";
}
Properties scmProperties = new Properties();
scmProperties.setProperty(SCM_ID, scmId);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org