adoroszlai commented on a change in pull request #1844:
URL: https://github.com/apache/ozone/pull/1844#discussion_r568033675



##########
File path: 
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java
##########
@@ -333,6 +358,16 @@ public static DatanodeDetails getFromProtoBuf(
    * @return HddsProtos.DatanodeDetailsProto
    */
   public HddsProtos.DatanodeDetailsProto getProtoBufMessage() {
+    return toProto(CURRENT_VERSION);
+  }
+
+  public HddsProtos.DatanodeDetailsProto toProto(int clientVersion) {
+    return toProtoBuilder(clientVersion).build();
+  }
+
+  public HddsProtos.DatanodeDetailsProto.Builder toProtoBuilder(
+      int clientVersion) {

Review comment:
       Thanks @xiaoyuyao for the review.  I'm not sure I understand the 
proposal.  Can you please clarify?
   
   We can embed the minimum version required for handling each port in the enum 
constants (eg. `0` for existing ports and `1` for the new replication port).  
But don't we still need the client version to be able to decide whether to 
include it in the proto message or not?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to