Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.8.0
-
None
Description
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
As it turns out, there are two places in external sort that can throw a user exception. But, because the log contains neither line numbers nor detailed messages, it is not obvious which one was the cause.
When logging a user error, include the text provided when building the error. For example, consider the following external sort code:
throw UserException.resourceError(e) .message("External Sort encountered an error while spilling to disk") .addContext(e.getMessage() /* more detail */) .build(logger);
The expected message is:
2016-11-18 ... INFO o.a.d.e.p.i.xsort.ExternalSortBatch - User Error Occurred: External Sort encountered an error while spilling to disk (Disk write failed)
The part in parens is the cause of the error: the e.getMessage( ) in the above code.
Attachments
Issue Links
- links to