xiangfu0 commented on code in PR #12389:
URL: https://github.com/apache/pinot/pull/12389#discussion_r1495127223


##########
pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotBrokerHealthCheck.java:
##########
@@ -79,4 +88,40 @@ public String getBrokerHealth() {
         
Response.status(Response.Status.SERVICE_UNAVAILABLE).entity(errMessage).build();
     throw new WebApplicationException(errMessage, response);
   }
+
+  @GET
+  @Produces(MediaType.TEXT_PLAIN)
+  @Path("uptime")
+  @Authorize(targetType = TargetType.CLUSTER, action = 
Actions.Cluster.GET_HEALTH)
+  @ApiOperation(value = "Get broker uptime")
+  public String getUptime() {
+    ServiceStatus.Status status = ServiceStatus.getServiceStatus(_instanceId);
+    if (status == ServiceStatus.Status.GOOD) {

Review Comment:
   I don't think we need to check service status here.
   Update can be just a seconds number 



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to