You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by su...@apache.org on 2016/12/13 00:40:05 UTC
[08/14] drill git commit: DRILL-5056: Fix UserException to write full
message to log
DRILL-5056: Fix UserException to write full message to log
A case occurred in which the External Sort failed during spilling.
All that was written to the log was:
2016-11-18 ... INFO o.a.d.e.p.i.xsort.ExternalSortBatch - User Error Occurred
Modified the logging code to provide more information to aid tracking down problems that occur in the field.
closes #665
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/641d35de
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/641d35de
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/641d35de
Branch: refs/heads/master
Commit: 641d35de03e84361ffe038fe30b717012c1571b8
Parents: 963955b
Author: Paul Rogers <pr...@maprtech.com>
Authored: Mon Nov 21 10:19:15 2016 -0800
Committer: Sudheesh Katkam <su...@apache.org>
Committed: Mon Dec 12 15:40:03 2016 -0800
----------------------------------------------------------------------
.../apache/drill/common/exceptions/UserException.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/641d35de/common/src/main/java/org/apache/drill/common/exceptions/UserException.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/drill/common/exceptions/UserException.java b/common/src/main/java/org/apache/drill/common/exceptions/UserException.java
index 35e71d1..87b3fd4 100644
--- a/common/src/main/java/org/apache/drill/common/exceptions/UserException.java
+++ b/common/src/main/java/org/apache/drill/common/exceptions/UserException.java
@@ -38,6 +38,7 @@ import org.slf4j.Logger;
* @see org.apache.drill.exec.proto.UserBitShared.DrillPBError.ErrorType
*/
public class UserException extends DrillRuntimeException {
+ private static final long serialVersionUID = -6720929331624621840L;
private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(UserException.class);
public static final String MEMORY_ERROR_MSG = "One or more nodes ran out of memory while executing the query.";
@@ -549,7 +550,15 @@ public class UserException extends DrillRuntimeException {
if (isSystemError) {
logger.error(newException.getMessage(), newException);
} else {
- logger.info("User Error Occurred", newException);
+ StringBuilder buf = new StringBuilder();
+ buf.append("User Error Occurred");
+ if (message != null) {
+ buf.append(": ").append(message);
+ }
+ if (cause != null) {
+ buf.append(" (").append(cause.getMessage()).append(")");
+ }
+ logger.info(buf.toString(), newException);
}
return newException;