xichen01 commented on code in PR #6655:
URL: https://github.com/apache/ozone/pull/6655#discussion_r1844965915
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java:
##########
@@ -492,14 +497,19 @@ public HddsProtos.DatanodeDetailsProto.Builder
toProtoBuilder(
ClientVersion.fromProtoValue(clientVersion)
.compareTo(VERSION_HANDLES_UNKNOWN_DN_PORTS) >= 0;
for (Port port : ports) {
- if (handlesUnknownPorts || Name.V0_PORTS.contains(port.getName())) {
- builder.addPorts(port.toProto());
- } else {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Skip adding {} port {} to proto message for client v{}",
- port.getName(), port.getValue(), clientVersion);
+ if (requiredPorts.isEmpty() || requiredPorts.contains(port.name)) {
+ if (handlesUnknownPorts || Name.V0_PORTS.contains(port.getName())) {
+ builder.addPorts(port.toProto());
+ } else {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Skip adding {} port {} to proto message for client v{}",
+ port.getName(), port.getValue(), clientVersion);
+ }
}
}
Review Comment:
OK, updated
--
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]