[
https://issues.apache.org/jira/browse/HDFS-2290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109549#comment-13109549
]
Laxman commented on HDFS-2290:
------------------------------
I can see one minor problem with testcode.
Always we are trying to restart datanode-0 only.
{code}
+ private void corruptBlock(MiniDFSCluster cluster, FileSystem fs,
+ final Path fileName, int dnIndex, Block block) throws IOException {
+ // corrupt the block on datanode dnIndex
+ // the indexes change once the nodes are restarted.
+ // But the datadirectory will not change
+ assertTrue(cluster.corruptReplica(block.getBlockName(), dnIndex));
+
+ DataNodeProperties dnProps = cluster.stopDataNode(0);
{code}
*Should it be*
{code}
+ DataNodeProperties dnProps = cluster.stopDataNode(dnIndex);
{code}
> Block with corrupt replica is not getting replicated
> ----------------------------------------------------
>
> Key: HDFS-2290
> URL: https://issues.apache.org/jira/browse/HDFS-2290
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.22.0
> Reporter: Konstantin Shvachko
> Assignee: Benoy Antony
> Fix For: 0.22.0
>
> Attachments: HDFS-2290_0.22.patch, HDFS-2290_022.patch,
> HDFS-2290_022.patch
>
>
> A block has one replica marked as corrupt and two good ones. countNodes()
> correctly detects that there are only 2 live replicas, and fsck reports the
> block as under-replicated. But ReplicationMonitor never schedules replication
> of good replicas.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira