You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/11/22 18:50:38 UTC

[GitHub] [pinot] Jackie-Jiang commented on a change in pull request #7364: support large payload in zk put API

Jackie-Jiang commented on a change in pull request #7364:
URL: https://github.com/apache/pinot/pull/7364#discussion_r754550186



##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/ZookeeperResource.java
##########
@@ -133,13 +136,23 @@ public SuccessResponse delete(
       @ApiResponse(code = 500, message = "Internal server error")
   })
   public SuccessResponse putData(
-      @ApiParam(value = "Zookeeper Path, must start with /", required = true, defaultValue = "/") @QueryParam("path")
+      @ApiParam(value = "Zookeeper Path, must start with /", defaultValue = "/") @QueryParam("path")
       @DefaultValue("") String path,
-      @ApiParam(value = "Content", required = true) @QueryParam("data") @DefaultValue("") String content,
-      @ApiParam(value = "expectedVersion", required = true, defaultValue = "-1") @QueryParam("expectedVersion")
+      @ApiParam(value = "Content") @QueryParam("data") @DefaultValue("") String content,
+      @ApiParam(value = "expectedVersion", defaultValue = "-1") @QueryParam("expectedVersion")
       @DefaultValue("-1") String expectedVersion,
-      @ApiParam(value = "accessOption", required = true, defaultValue = "1") @QueryParam("accessOption")
-      @DefaultValue("1") String accessOption) {
+      @ApiParam(value = "accessOption", defaultValue = "1") @QueryParam("accessOption")
+      @DefaultValue("1") String accessOption,
+      @Nullable Payload payload
+  ) {
+
+    if (payload != null) {
+      path = payload.getPath();

Review comment:
       We should only override the value when it is provided in the payload

##########
File path: pinot-controller/src/test/java/org/apache/pinot/controller/api/ZookeeperResourceTest.java
##########
@@ -0,0 +1,101 @@
+package org.apache.pinot.controller.api;

Review comment:
       Missing license header




-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org