You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/07/20 17:20:49 UTC

[GitHub] [pulsar] jerrypeng commented on a change in pull request #7601: Add readiness api for the worker leader

jerrypeng commented on a change in pull request #7601:
URL: https://github.com/apache/pulsar/pull/7601#discussion_r457570328



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/Worker.java
##########
@@ -129,4 +129,19 @@ public WorkerInfo getClusterLeader() {
     public void rebalance() {
         worker.rebalance(uri.getRequestUri(), clientAppId());
     }
+
+    @GET
+    @ApiOperation(
+            value = "Checks if this node is the leader and is ready to service requests",
+            response = String.class
+    )
+    @ApiResponses(value = {
+            @ApiResponse(code = 401, message = "The requester is not authenticated"),
+            @ApiResponse(code = 503, message = "Worker service is not running")
+    })
+    @Path("/cluster/leaderready")

Review comment:
       I think the url path would be more clean if it is /cluster/leader/ready.  We can add more API under "/leader" in future




----------------------------------------------------------------
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:
users@infra.apache.org