smengcl commented on code in PR #11961:
URL: https://github.com/apache/ozone/pull/11961#discussion_r4493054405
##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -585,6 +585,25 @@
ozone.om.address.service1.om1
</description>
</property>
+ <property>
+ <name>ozone.om.bind.host</name>
Review Comment:
Moved `ozone.om.bind.host` into `OmConfig` (with `OmConfig.Keys.BIND_HOST`)
and removed it from `ozone-default.xml` and `OMConfigKeys` in 45e76a94f4a.
_🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java:
##########
@@ -117,6 +118,21 @@ public static InetSocketAddress
getOmAddress(ConfigurationSource conf) {
return NetUtils.createSocketAddr(getOmRpcAddress(conf));
}
+ /**
+ * Returns the address the OM RPC server binds to. If {@code
ozone.om.bind.host} is set, its host
+ * replaces the host of the given RPC address; the port is always kept. OM
keeps advertising the RPC address.
+ *
+ * @param conf configuration
+ * @param omRpcAddress the OM RPC address from {@code ozone.om.address}
+ * @return the address for the OM RPC listener
+ */
+ public static InetSocketAddress getOmRpcBindAddress(ConfigurationSource
conf, InetSocketAddress omRpcAddress) {
Review Comment:
Moved it to `OmConfig#getRpcBindAddress` in 45e76a94f4a. `OzoneManager`
reads a fresh `OmConfig` from the HA-loaded conf for it, since the `config`
field is built before `loadOMHAConfig` copies the per-node key. The unit test
moved to `TestOmConfig`.
_🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
--
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]