suddendust commented on code in PR #12497:
URL: https://github.com/apache/pinot/pull/12497#discussion_r1502968851
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/ZookeeperResource.java:
##########
@@ -256,6 +257,56 @@ public SuccessResponse putData(
}
}
+ @POST
+ @Path("/zk/create")
+ @Authorize(targetType = TargetType.CLUSTER, action =
Actions.Cluster.UPDATE_ZNODE)
+ @Authenticate(AccessType.CREATE)
+ @Produces(MediaType.APPLICATION_JSON)
+ @Consumes(MediaType.APPLICATION_JSON)
+ @ApiOperation(value = "Create a node at a given path")
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "Success"), @ApiResponse(code = 204,
message = "No Content"),
+ @ApiResponse(code = 400, message = "Bad Request"), @ApiResponse(code =
500, message = "Internal server error")
+ })
+ public SuccessResponse createNode(
Review Comment:
This complicates the existing API. Now we have 1. `expectedVersion` which is
not required for creating new node. 2. `ttl` which is not required to update a
new node. Not to mention the POST vs PUT semantics would also be incorrect.
Wdyt?
--
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]