HADOOP-10455. When there is an exception, ipc.Server should first check whether it is an terse exception.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1583842 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b0180afc9c
commit
5c7cb51775
|
@ -350,6 +350,9 @@ Release 2.4.1 - UNRELEASED
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
||||||
|
HADOOP-10455. When there is an exception, ipc.Server should first check
|
||||||
|
whether it is an terse exception. (szetszwo)
|
||||||
|
|
||||||
Release 2.4.0 - 2014-04-07
|
Release 2.4.0 - 2014-04-07
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -2107,16 +2107,15 @@ public abstract class Server {
|
||||||
if (e instanceof UndeclaredThrowableException) {
|
if (e instanceof UndeclaredThrowableException) {
|
||||||
e = e.getCause();
|
e = e.getCause();
|
||||||
}
|
}
|
||||||
String logMsg = Thread.currentThread().getName() + ", call " + call + ": error: " + e;
|
String logMsg = Thread.currentThread().getName() + ", call " + call;
|
||||||
if (e instanceof RuntimeException || e instanceof Error) {
|
if (exceptionsHandler.isTerse(e.getClass())) {
|
||||||
|
// Don't log the whole stack trace. Way too noisy!
|
||||||
|
LOG.info(logMsg + ": " + e);
|
||||||
|
} else if (e instanceof RuntimeException || e instanceof Error) {
|
||||||
// These exception types indicate something is probably wrong
|
// These exception types indicate something is probably wrong
|
||||||
// on the server side, as opposed to just a normal exceptional
|
// on the server side, as opposed to just a normal exceptional
|
||||||
// result.
|
// result.
|
||||||
LOG.warn(logMsg, e);
|
LOG.warn(logMsg, e);
|
||||||
} else if (exceptionsHandler.isTerse(e.getClass())) {
|
|
||||||
// Don't log the whole stack trace of these exceptions.
|
|
||||||
// Way too noisy!
|
|
||||||
LOG.info(logMsg);
|
|
||||||
} else {
|
} else {
|
||||||
LOG.info(logMsg, e);
|
LOG.info(logMsg, e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue