You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by te...@apache.org on 2022/08/10 11:29:42 UTC
[pulsar] 02/04: [fix][broker]remove exception log when access status.html (#17025)
This is an automated email from the ASF dual-hosted git repository.
technoboy pushed a commit to branch branch-2.11
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit dad4db16b4c4b2cb57d1a42c80a151c938b2629e
Author: fengyubiao <yu...@streamnative.io>
AuthorDate: Wed Aug 10 13:46:12 2022 +0800
[fix][broker]remove exception log when access status.html (#17025)
---
.../main/java/org/apache/pulsar/common/configuration/VipStatus.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pulsar-broker-common/src/main/java/org/apache/pulsar/common/configuration/VipStatus.java b/pulsar-broker-common/src/main/java/org/apache/pulsar/common/configuration/VipStatus.java
index a0bd7a35bce..dcde2d02dd5 100644
--- a/pulsar-broker-common/src/main/java/org/apache/pulsar/common/configuration/VipStatus.java
+++ b/pulsar-broker-common/src/main/java/org/apache/pulsar/common/configuration/VipStatus.java
@@ -26,10 +26,12 @@ import javax.ws.rs.Path;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response.Status;
+import lombok.extern.slf4j.Slf4j;
/**
* Web resource used by the VIP service to check to availability of the service instance.
*/
+@Slf4j
@Path("/status.html")
public class VipStatus {
@@ -40,7 +42,6 @@ public class VipStatus {
protected ServletContext servletContext;
@GET
- @Context
public String checkStatus() {
String statusFilePath = (String) servletContext.getAttribute(ATTRIBUTE_STATUS_FILE_PATH);
@SuppressWarnings("unchecked")
@@ -54,6 +55,7 @@ public class VipStatus {
return "OK";
}
}
+ log.warn("Failed to access \"status.html\". The service is not ready");
throw new WebApplicationException(Status.NOT_FOUND);
}