hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2205) Log message for failed connection to datanode is not followed by a success message.
Date Fri, 07 Oct 2011 19:58:29 GMT

    [ https://issues.apache.org/jira/browse/HDFS-2205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123124#comment-13123124

Steve Loughran commented on HDFS-2205:

instead of going {{LOG.warn("text" + ex.getMessage() );}}

can you go {{LOG.warn("text" + ex, ex );}}

Two reasons
# not all exceptions have a message (e.g NullPointerException)
# the second argument hands off the potentially nested exception chain to the logger to process
as its formatter sees fit.

A lot of the existing code doesn't get this right, but this patch makes things slightly worse
in terms of reporting the exception itself.

Also, why log at debug the connection failure when more info is being printed at warn() level?
I'd delete the debug logging clause. 

> Log message for failed connection to datanode is not followed by a success message.
> -----------------------------------------------------------------------------------
>                 Key: HDFS-2205
>                 URL: https://issues.apache.org/jira/browse/HDFS-2205
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs client
>    Affects Versions: 0.23.0
>            Reporter: Ravi Prakash
>            Assignee: Ravi Prakash
>             Fix For: 0.23.0
>         Attachments: HDFS-2205.patch, HDFS-2205.patch
> To avoid confusing users on whether their HDFS operation was succesful or not, a success
message should be printed.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message