[ 
https://issues.apache.org/jira/browse/HDFS-1918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Daniel Cryans updated HDFS-1918:
-------------------------------------

    Attachment: HDFS-1918.patch

It took me some time to understand what was going on, looks like there's a lot 
of cruft, so here's what this patch does:

 - BlockSender doesn't convert pure IOEs to SocketExceptions because HDFS-1527 
showed that it may hide other issues (and that's why more logging of the 
exceptions was added).
 - Because of that, there's no need to catch the IOEs at all so I refactored 
the try/catches out.
 - DataXceiver now cares about all the IOEs coming out. Like it says in the 
comments it used to shutdown so my guess (which could be confirmed by digging 
in years of SVN commits) is that the SocketException trickery was made so that 
it wouldn't shut the DN down for "normal" reasons. Now that the code doesn't do 
that anymore, there's no reason to hack the IOEs into SocketExceptions (which 
was bad to begin with). I also added a comment to the others to describe the 
current state.
 - opReadBlock doesn't throw the IOE anymore so that run() doesn't print it 
too. I don't see any way this could change the behavior of the class.

I didn't add any unit test since no behavior was changed.

> DataXceiver double logs every IOE out of readBlock
> --------------------------------------------------
>
>                 Key: HDFS-1918
>                 URL: https://issues.apache.org/jira/browse/HDFS-1918
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>    Affects Versions: 0.20.2
>            Reporter: Jean-Daniel Cryans
>            Priority: Trivial
>             Fix For: 0.22.0
>
>         Attachments: HDFS-1918.patch
>
>
> DataXceiver will log an IOE twice because opReadBlock() will catch it, log a 
> WARN, then throw it again only to be caught in run() as a Throwable and 
> logged as an ERROR. As far as I can tell all the information is the same in 
> both messages.

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

Reply via email to