This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch adding-controller-healthcheck-endpoint
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit 1820b5967764a4175290eed641c685460256c728
Author: Xiang Fu <fx19880...@gmail.com>
AuthorDate: Tue Aug 11 14:36:18 2020 -0700

    Adding /health endpoint in pinot controller
---
 .../controller/api/resources/PinotControllerHealthCheck.java | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git 
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotControllerHealthCheck.java
 
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotControllerHealthCheck.java
index 7370085..5876b3e 100644
--- 
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotControllerHealthCheck.java
+++ 
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotControllerHealthCheck.java
@@ -43,6 +43,18 @@ public class PinotControllerHealthCheck {
   @ApiOperation(value = "Check controller health")
   @ApiResponses(value = {@ApiResponse(code = 200, message = "Good")})
   @Produces(MediaType.TEXT_PLAIN)
+  public String checkHealthLegacy() {
+    if (StringUtils.isNotBlank(controllerConf.generateVipUrl())) {
+      return "GOOD";
+    }
+    return "";
+  }
+
+  @GET
+  @Path("health")
+  @ApiOperation(value = "Check controller health")
+  @ApiResponses(value = {@ApiResponse(code = 200, message = "Good")})
+  @Produces(MediaType.TEXT_PLAIN)
   public String checkHealth() {
     if (StringUtils.isNotBlank(controllerConf.generateVipUrl())) {
       return "GOOD";


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to