errose28 commented on code in PR #10611:
URL: https://github.com/apache/ozone/pull/10611#discussion_r3539111624
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java:
##########
@@ -345,24 +345,23 @@ public XceiverClientFactory getXceiverClientManager() {
}
public static OzoneManagerVersion getOmVersion(ServiceInfoEx info) {
- OzoneManagerVersion version = OzoneManagerVersion.SOFTWARE_VERSION;
+ OzoneManagerVersion minOMVersion = OzoneManagerVersion.SOFTWARE_VERSION;
for (ServiceInfo si : info.getServiceInfoList()) {
if (si.getNodeType() == HddsProtos.NodeType.OM) {
- OzoneManagerVersion current =
- OzoneManagerVersion.deserialize(si.getProtobuf().getOMVersion());
- if (version.compareTo(current) > 0) {
- version = current;
+ OzoneManagerVersion omVersion =
OzoneManagerVersion.deserialize(si.getProtobuf().getOMVersion());
+ if (!minOMVersion.isSupportedBy(omVersion)) {
+ minOMVersion = omVersion;
}
}
}
- LOG.trace("Ozone Manager version is {}", version.name());
- return version;
+ LOG.trace("Ozone Manager version is {}", minOMVersion);
Review Comment:
In the new version framework I added a `toString` for the versions that
prints both the name and version. Changing this log to info level and running a
unit test shows:
```
2026-07-07 15:24:30,007 [main] INFO rpc.RpcClient
(RpcClient.java:getOmVersion(357)) - Ozone Manager version is ZDU (100)
```
--
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]