Skip to content

Commit c9334f7

Browse files
mukesh-ctdssrinath-ctds
authored andcommitted
Renamed the API for function worker liveliness probe
1 parent ed7b2e7 commit c9334f7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/v3/FunctionsApiV3Resource.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,13 @@ public void updateFunctionOnWorkerLeader(final @PathParam("tenant") String tenan
432432
}
433433

434434
@GET
435-
@Path("/live")
436-
public Response checkLiveliness() {
435+
@Path("/healthz")
436+
@ApiOperation(value = "Run a healthCheck against the function worker")
437+
@ApiResponses(value = {
438+
@ApiResponse(code = 200, message = "Everything is OK"),
439+
@ApiResponse(code = 503, message = "Service not available")
440+
})
441+
public Response healthCheck() {
437442
boolean isAlive = functions().checkLiveliness();
438443
if (!isAlive) {
439444
return Response.status(Response.Status.SERVICE_UNAVAILABLE)

0 commit comments

Comments
 (0)