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

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new a4a7e64  [Enhance] Add BackendHbResponse info (#6929)
a4a7e64 is described below

commit a4a7e642b456df735dd108735f72a5b406b9b822
Author: dh-cloud <60729713+dh-cl...@users.noreply.github.com>
AuthorDate: Wed Oct 27 09:56:07 2021 +0800

    [Enhance] Add BackendHbResponse info (#6929)
    
    when be has excepiton, fe doesn't log the BackendHbResponse info, so we 
can't know which be has exception
    
    the exception log is:
    `WARN (heartbeat mgr|31) [HeartbeatMgr.runAfterCatalogReady():141] get bad 
heartbeat response: type: BACKEND, status: BAD, msg: java.net.ConnectException: 
Connection refused (Connection refused)
    `
    
    so need add toString(), then fe can log the BackendHbResponse info
---
 .../main/java/org/apache/doris/system/BackendHbResponse.java  | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/system/BackendHbResponse.java 
b/fe/fe-core/src/main/java/org/apache/doris/system/BackendHbResponse.java
index 9db8790..1818c01 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/system/BackendHbResponse.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/system/BackendHbResponse.java
@@ -104,5 +104,16 @@ public class BackendHbResponse extends HeartbeatResponse 
implements Writable {
         httpPort = in.readInt();
         brpcPort = in.readInt();
     }
+       
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(super.toString());
+        sb.append(", beId: ").append(beId);
+        sb.append(", bePort: ").append(bePort);
+        sb.append(", httpPort: ").append(httpPort);
+        sb.append(", brpcPort: ").append(brpcPort);
+        return sb.toString();
+    }
 
 }

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

Reply via email to