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

Todd Lipcon commented on HDFS-2054:
-----------------------------------

Yea, it sucks that Java doesn't give us a way to get at the underlying errno in 
these cases. For the IOEs thrown by the hadoop-native code in common, we 
actually have an Errno enum that makes life easy.

I'm not in favor of parsing the exception text for behavior-altering things. 
But for deciding whether to log at debug vs warn level, it seems OK to me.

Another thought is to check something like socket.isInputShutdown() or 
socket.isConnected()? Maybe we can assume that any case where we get an IOE but 
the socket was then found to be disconnected is OK. If we had a local IOE with 
the transferto, the socket would still be up.

> BlockSender.sendChunk() prints ERROR for connection closures encountered  
> during transferToFully()
> --------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-2054
>                 URL: https://issues.apache.org/jira/browse/HDFS-2054
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: data-node
>    Affects Versions: 0.22.0, 0.23.0
>            Reporter: Kihwal Lee
>            Assignee: Kihwal Lee
>            Priority: Minor
>         Attachments: HDFS-2054.patch
>
>
> The addition of ERROR was part of HDFS-1527. In environments where clients 
> tear down FSInputStream/connection before reaching the end of stream, this 
> error message often pops up. Since these are not really errors and especially 
> not the fault of data node, the message should be toned down at least. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to