ChenSammi commented on code in PR #9282:
URL: https://github.com/apache/ozone/pull/9282#discussion_r2597502561
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMNodeInfo.java:
##########
@@ -74,6 +74,18 @@ public static List<SCMNodeInfo>
buildNodeInfo(ConfigurationSource conf) {
// First figure out scm client address from HA style config.
// If service Id is not defined, fall back to non-HA config.
+ // Check for common configuration typo
+ if (conf.get("ozone.scm.service.ids") == null) {
+ String typo = conf.get("ozone.scm.service.id");
+ String errorMsg = "Configuration property 'ozone.scm.service.ids' is
missing.\n";
+ if (typo != null) {
+ errorMsg += "Found 'ozone.scm.service.id=" + typo + "' in
configuration.\n" +
+ "Did you mean 'ozone.scm.service.ids'?\n";
+ }
+ errorMsg += "For SCM HA configuration, use 'ozone.scm.service.ids' to
specify service IDs.";
+ throw new ConfigurationException(errorMsg);
+ }
+
Review Comment:
It's better to log the detail scmServiceId in the if (scmServiceId!=null)
scope, for example,
LOG.info("{} for StorageContainerManager is {}", OZONE_SCM_SERVICE_IDS_KEY,
scmServiceId);
and log another message in the else branch,
LOG.info("ServiceID for StorageContainerManager is dummy service ID {}",
scmServiceId);
so we will know which configuration path is taken for this bootstrap.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]