You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ma...@apache.org on 2022/08/10 15:17:09 UTC
[pulsar] 12/12: [fix][broker]remove exception log when access status.html (#17025)
This is an automated email from the ASF dual-hosted git repository.
mattisonchao pushed a commit to branch branch-2.9
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit e434a531a112b67fd62fa17af2eb111bf9c28125
Author: fengyubiao <yu...@streamnative.io>
AuthorDate: Wed Aug 10 13:46:12 2022 +0800
[fix][broker]remove exception log when access status.html (#17025)
(cherry picked from commit 4b757cf9f9046c7143329156b1009fe43217eaea)
---
.../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 c80f0a5471c..af1c8b34ead 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
@@ -27,10 +27,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 {
@@ -41,7 +43,6 @@ public class VipStatus {
protected ServletContext servletContext;
@GET
- @Context
public String checkStatus() {
String statusFilePath = (String) servletContext.getAttribute(ATTRIBUTE_STATUS_FILE_PATH);
@SuppressWarnings("unchecked")
@@ -55,6 +56,7 @@ public class VipStatus {
return "OK";
}
}
+ log.warn("Failed to access \"status.html\". The service is not ready");
throw new WebApplicationException(Status.NOT_FOUND);
}