[
https://issues.apache.org/jira/browse/HDFS-3548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407573#comment-13407573
]
Colin Patrick McCabe commented on HDFS-3548:
--------------------------------------------
bq. Looks good. I'd go one step further to prevent similar situations (we have
duplicate methods, see HDFS-3015, and only copy gets the fix) and (1) nuke the
bestNode method here and use the version from jspHelper, and then (2) move
copyBlock here to a util class and structure it similarly to streamBlockInAscii
(eg bestNode already handles the connect timeout so we don't need to duplicate
that logic in copyBlock).
Yeah, there is definitely some refactoring we should do here to avoid the
duplication. Let's do that as part of HDFS-3015, after the immediate bug can
be fixed here.
I'll re-issue this patch with style nits fixed...
> NamenodeFsck.copyBlock fails to create a Block Reader
> -----------------------------------------------------
>
> Key: HDFS-3548
> URL: https://issues.apache.org/jira/browse/HDFS-3548
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.23.1, 2.0.0-alpha
> Reporter: Todd Lipcon
> Assignee: Colin Patrick McCabe
> Priority: Critical
> Attachments: HDFS-3548.001.patch
>
>
> NamenodeFsck.copyBlock creates a Socket using {{new Socket()}}, and thus that
> socket doesn't have an associated Channel. Then, it fails to create a
> BlockReader since RemoteBlockReader2 needs a socket channel.
> (thanks to Hiroshi Yokoi for reporting)
--
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