Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
3.0.0, 4.0.0
Description
HiveMetaStore.java
} catch (Throwable x) { x.printStackTrace(); HMSHandler.LOG.error(StringUtils.stringifyException(x)); throw x; }
Bad design here of "log and throw". Don't do it. Just throw the exception and let it be handled, and logged, in one place. At the very least, we don't need the error message to go into the STDERR logs with printStackTrace, please remove. And remove the stringifyException code. Just use the normal logging faciltiies at the 'debug' level logging to hide the stack trace during normal operations.
HMSHandler.LOG.debug("Error", e);