From 69fe37a007045c3a3cf3b2b410e1ad14717fdb76 Mon Sep 17 00:00:00 2001 From: Todd Lipcon Date: Mon, 7 Mar 2011 03:44:30 +0000 Subject: [PATCH] HADOOP-7159. RPC server should log the client hostname when read exception happened. Contributed by Scott Chen. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1078669 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 3 +++ src/java/org/apache/hadoop/ipc/Server.java | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 65283af5abd..ad5a7799ac2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -66,6 +66,9 @@ Trunk (unreleased changes) HADOOP-7114. FsShell should dump all exceptions at DEBUG level. (todd via tomwhite) + HADOOP-7159. RPC server should log the client hostname when read exception + happened. (Scott Chen via todd) + OPTIMIZATIONS BUG FIXES diff --git a/src/java/org/apache/hadoop/ipc/Server.java b/src/java/org/apache/hadoop/ipc/Server.java index 3dbeb02aedd..955b1d62260 100644 --- a/src/java/org/apache/hadoop/ipc/Server.java +++ b/src/java/org/apache/hadoop/ipc/Server.java @@ -559,7 +559,9 @@ public abstract class Server { LOG.info(getName() + ": readAndProcess caught InterruptedException", ieo); throw ieo; } catch (Exception e) { - LOG.info(getName() + ": readAndProcess threw exception " + e + ". Count of bytes read: " + count, e); + LOG.info(getName() + ": readAndProcess threw exception " + e + + " from client " + c.getHostAddress() + + ". Count of bytes read: " + count, e); count = -1; //so that the (count < 0) block is executed } if (count < 0) {