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 06:07:39 UTC

[GitHub] [pulsar] jerrypeng opened a new pull request #7350: Add an endpoint to check whether function worker service is initialized

jerrypeng opened a new pull request #7350:
URL: https://github.com/apache/pulsar/pull/7350


   
   
   ### Motivation
   
   Add an endpoint to check whether function worker service is initialized. This endpoint can be used as a readiness check
   
   


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



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

Posted by GitBox <gi...@apache.org>.
jerrypeng commented on pull request #7350:
URL: https://github.com/apache/pulsar/pull/7350#issuecomment-648640460


   /pulsarbot run-failure-checks


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



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

Posted by GitBox <gi...@apache.org>.
jerrypeng commented on pull request #7350:
URL: https://github.com/apache/pulsar/pull/7350#issuecomment-648612139


   @cckellogg please also review


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



[GitHub] [pulsar] jerrypeng merged pull request #7350: Add an endpoint to check whether function worker service is initialized

Posted by GitBox <gi...@apache.org>.
jerrypeng merged pull request #7350:
URL: https://github.com/apache/pulsar/pull/7350


   


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



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

Posted by GitBox <gi...@apache.org>.
jerrypeng commented on pull request #7350:
URL: https://github.com/apache/pulsar/pull/7350#issuecomment-649098202


   /pulsarbot run-failure-checks


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



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

Posted by GitBox <gi...@apache.org>.
jerrypeng commented on pull request #7350:
URL: https://github.com/apache/pulsar/pull/7350#issuecomment-649775863


   /pulsarbot run-failure-checks


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



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

Posted by GitBox <gi...@apache.org>.
jerrypeng commented on pull request #7350:
URL: https://github.com/apache/pulsar/pull/7350#issuecomment-649153956


   /pulsarbot run-failure-checks


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



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

Posted by GitBox <gi...@apache.org>.
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