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/06/24 07:27:15 UTC

[GitHub] [pulsar] cckellogg commented on a change in pull request #7350: Add an endpoint to check whether function worker service is initialized

cckellogg commented on a change in pull request #7350:
URL: https://github.com/apache/pulsar/pull/7350#discussion_r444697178



##########
File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/v2/WorkerApiV2Resource.java
##########
@@ -132,4 +140,21 @@ public WorkerInfo getClusterLeader() {
     public List<ConnectorDefinition> getConnectorsList() throws IOException {
         return worker.getListOfConnectors(clientAppId());
     }
+
+    @GET
+    @ApiOperation(
+            value = "Determines whether the worker service is initialized and ready for use",
+            response = Boolean.class
+    )
+    @ApiResponses(value = {
+            @ApiResponse(code = 400, message = "Invalid request"),
+            @ApiResponse(code = 408, message = "Request timeout")
+    })
+    @Path("/initialized")

Review comment:
       What is the full path for this? Will callers need to be authenticated? If so we might want to make that optional (like the metrics endpoint). Otherwise, using this as a readiness/liveness probe in kubernetes will be difficult.




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