You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2020/08/11 21:41:18 UTC
[incubator-pinot] 01/02: Adding /health endpoint in pinot controller
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 <fx...@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-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org