From 8e6ad7a8c08ea210a2e3ddd84c9160dddee62be8 Mon Sep 17 00:00:00 2001 From: zhanghaobo Date: Tue, 13 May 2025 16:07:28 +0800 Subject: [PATCH] HADOOP-19566. sendDeferedResponse should also log exception info. --- .../src/main/java/org/apache/hadoop/ipc/Server.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java index 289403d942bd1..f82a7bafdfb47 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java @@ -1384,9 +1384,9 @@ private void sendDeferedResponse() { // from a method. It does not expect to receive an error. // This is equivalent to what happens in synchronous calls when the // Responder is not able to send out the response. - LOG.error("Failed to send deferred response. ThreadName=" + Thread - .currentThread().getName() + ", CallId=" - + callId + ", hostname=" + getHostAddress()); + LOG.error("Failed to send deferred response. ThreadName={}, CallId={}, Hostname={}," + + " Exception is {}", Thread.currentThread().getName(), callId, + getHostInetAddress(), e.toString()); } getProcessingDetails().set(Timing.RESPONSE, Time.monotonicNowNanos() - startNanos, TimeUnit.NANOSECONDS); @@ -1403,9 +1403,8 @@ public void setDeferredResponse(Writable response) { // returned from a method. It does not expect to receive an error. // This is equivalent to what happens in synchronous calls when the // response cannot be sent. - LOG.error( - "Failed to setup deferred successful response. ThreadName=" + - Thread.currentThread().getName() + ", Call=" + this); + LOG.error("Failed to setup deferred successful response. ThreadName={}, Call={}," + + " Exception is {}", Thread.currentThread().getName(), this, e.toString()); return; } sendDeferedResponse();