drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5056) UserException does not write full message to log
Date Mon, 21 Nov 2016 18:20:58 GMT

    [ https://issues.apache.org/jira/browse/DRILL-5056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15684311#comment-15684311
] 

ASF GitHub Bot commented on DRILL-5056:
---------------------------------------

GitHub user paul-rogers opened a pull request:

    https://github.com/apache/drill/pull/665

    DRILL-5056: UserException does not 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.
    
    Also cleaned up some warnings found while tracking down this issue.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/paul-rogers/drill DRILL-5056

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/665.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #665
    
----
commit dfebfa59c35abbbc54ea0719d5c8c2b5923c0c7a
Author: Paul Rogers <progers@maprtech.com>
Date:   2016-11-21T18:19:15Z

    DRILL-5056: UserException does not 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.
    
    Also cleaned up some warnings found while tracking down this issue.

----


> UserException does not write full message to log
> ------------------------------------------------
>
>                 Key: DRILL-5056
>                 URL: https://issues.apache.org/jira/browse/DRILL-5056
>             Project: Apache Drill
>          Issue Type: Improvement
>    Affects Versions: 1.8.0
>            Reporter: Paul Rogers
>            Priority: Minor
>
> A case occurred in which the External Sort failed during spilling. All that was written
to the log was:
> {code}
> 2016-11-18 ... INFO  o.a.d.e.p.i.xsort.ExternalSortBatch - User Error Occurred
> {code}
> 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:
> {code}
>       throw UserException.resourceError(e)
>         .message("External Sort encountered an error while spilling to disk")
>               .addContext(e.getMessage() /* more detail */)
>         .build(logger);
> {code}
> The expected message is:
> {code}
> 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) 
> {code}
> The part in parens is the cause of the error: the {{e.getMessage( )}} in the above code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message