jerrypeng commented on a change in pull request #12178:
URL: https://github.com/apache/pulsar/pull/12178#discussion_r716908422
##########
File path:
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/v2/WorkerApiV2Resource.java
##########
@@ -156,6 +160,65 @@ public void rebalance() {
workers().rebalance(uri.getRequestUri(), clientAppId());
}
+ @PUT
+ @ApiOperation(
+ value = "Drains the specified worker, i.e., moves its
work-assignments to other workers"
+ )
+ @ApiResponses(value = {
+ @ApiResponse(code = 400, message = "Invalid request"),
+ @ApiResponse(code = 403, message = "The requester doesn't have
admin permissions"),
+ @ApiResponse(code = 408, message = "Request timeout"),
+ @ApiResponse(code = 409, message = "Drain already in progress"),
+ @ApiResponse(code = 503, message = "Worker service is not ready")
+ })
+ @Path("/leader/{drain}")
+ public void drainAtLeader(@PathParam("drain") String workerId) {
Review comment:
I think a better name for the URL parameter is "workerId".
--
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]