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



##########
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:
       Can we embed the version info inside the PORT Enum without passing 
clientVersion as parameter?
    
   This way, we can make the the handling of the version specific 
deserialization easier for future changes.




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