You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ChenSammi (via GitHub)" <gi...@apache.org> on 2025/12/04 09:42:03 UTC
Re: [PR] HDDS-13866. Ozone datanode startup exception on colocated hosts locked the storage directory:./ratis/ [ozone]
ChenSammi commented on code in PR #9318:
URL: https://github.com/apache/ozone/pull/9318#discussion_r2588276957
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/ServerUtils.java:
##########
@@ -300,11 +300,88 @@ public static String getRemoteUserName() {
return remoteUser != null ? remoteUser.getUserName() : null;
}
- public static String getDefaultRatisDirectory(ConfigurationSource conf) {
+ /**
+ * Get the default Ratis directory for a component when the specific
+ * configuration is not set. This creates a component-specific subdirectory
+ * under ozone.metadata.dirs to avoid conflicts when multiple components
+ * are colocated on the same host.
+ *
+ * <p>For backward compatibility during upgrades, this method checks for
+ * existing Ratis data in old locations before using the new component-specific
+ * location. See {@link #findExistingRatisDirectory} for details on old locations.
+ *
+ * @param conf Configuration source
+ * @param componentName Name of the component (e.g., "scm", "om", "dn")
+ * @return Path to the component-specific ratis directory
+ */
+ public static String getDefaultRatisDirectory(ConfigurationSource conf,
+ String componentName) {
Review Comment:
Can leverage NodeType for componentName.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org