swamirishi commented on code in PR #6812:
URL: https://github.com/apache/ozone/pull/6812#discussion_r1639825598


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/storage/ContainerProtocolCalls.java:
##########
@@ -97,6 +98,28 @@ public final class ContainerProtocolCalls  {
   private ContainerProtocolCalls() {
   }
 
+  /**
+   * Creates a ContainerCommandRequestProto with version set.
+   */
+  public static ContainerCommandRequestProto.Builder 
getContainerCommandRequestProtoBuilder(int version) {
+    return getContainerCommandRequestProtoBuilder(null, version);
+  }
+
+  public static ContainerCommandRequestProto.Builder 
getContainerCommandRequestProtoBuilder() {
+    return getContainerCommandRequestProtoBuilder(null, 
ClientVersion.CURRENT.toProtoValue());
+  }
+
+  public static ContainerCommandRequestProto.Builder 
getContainerCommandRequestProtoBuilder(
+      ContainerCommandRequestProto req, int version) {
+    return (req == null ?
+        ContainerCommandRequestProto.newBuilder() : 
ContainerCommandRequestProto.newBuilder(req)).setVersion(version);
+  }

Review Comment:
   If that is the case we should just send a builder than sending the request 
object. That is also one viable change.



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

Reply via email to