dombizita commented on code in PR #10611:
URL: https://github.com/apache/ozone/pull/10611#discussion_r3500022744
##########
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:
```suggestion
LOG.trace("Ozone Manager version is {}", minOMVersion.name());
```
##########
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:
Isn't that missing?
```suggestion
LOG.trace("Ozone Manager version is {}", minOMVersion.name());
```
--
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]