[
https://issues.apache.org/jira/browse/HADOOP-6004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719702#action_12719702
]
Jakob Homan commented on HADOOP-6004:
-------------------------------------
Quite right. A better refactoring would be to pull out the whole:
{noformat}
int numHosts = in.readInt();
this.hosts = new String[numHosts];
for (int i = 0; i < numHosts; i++) {
Text host = new Text();
host.readFields(in);
hosts[i] = host.toString();
}
{noformat}
block into a separate method, since it's repeated three times for each of the
sections...
> BlockLocation deserialization is incorrect
> ------------------------------------------
>
> Key: HADOOP-6004
> URL: https://issues.apache.org/jira/browse/HADOOP-6004
> Project: Hadoop Core
> Issue Type: Bug
> Components: fs
> Reporter: Jakob Homan
> Assignee: Jakob Homan
> Attachments: HADOOP-6004.patch, HADOOP-6004.patch
>
>
> The {{readFields}} method of {{BlockLocation}} does not correctly allocate
> new arrays for topologyPaths and hosts. Patch shortly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.