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
This commit is contained in:
Todd Lipcon 2011-03-07 03:44:30 +00:00
parent 97dcf05fde
commit 69fe37a007
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -559,7 +559,9 @@ void doRead(SelectionKey key) throws InterruptedException {
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) {