HADOOP-7358. Merge r1205697 from trunk to 0.23
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1298207 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1a4e973924
commit
16afca9a55
|
@ -1426,6 +1426,9 @@ Release 0.22.0 - 2011-11-29
|
|||
|
||||
HADOOP-7786. Remove HDFS-specific config keys defined in FsConfig. (eli)
|
||||
|
||||
HADOOP-7358. Improve log levels when exceptions caught in RPC handler
|
||||
(Todd Lipcon via shv)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HADOOP-6884. Add LOG.isDebugEnabled() guard for each LOG.debug(..).
|
||||
|
|
|
@ -1627,7 +1627,16 @@ public abstract class Server {
|
|||
);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
LOG.info(getName() + ", call: " + call + ", error: ", e);
|
||||
String logMsg = getName() + ", call " + call + ": error: " + e;
|
||||
if (e instanceof RuntimeException || e instanceof Error) {
|
||||
// These exception types indicate something is probably wrong
|
||||
// on the server side, as opposed to just a normal exceptional
|
||||
// result.
|
||||
LOG.warn(logMsg, e);
|
||||
} else {
|
||||
LOG.info(logMsg, e);
|
||||
}
|
||||
|
||||
errorClass = e.getClass().getName();
|
||||
error = StringUtils.stringifyException(e);
|
||||
// Remove redundant error class name from the beginning of the stack trace
|
||||
|
|
Loading…
Reference in New Issue