[
https://issues.apache.org/jira/browse/HDFS-2290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112606#comment-13112606
]
John George commented on HDFS-2290:
-----------------------------------
What one of the other tests does is to sleep in a while loop for about 20
times, each time "sleeping" for a second and checking if it got the expected
results. This way, the test was not sleeping for more time than necessary. If
there is a better way, I am all ears as well...
{code}
+ while (tries++ < 20) {
+ try {
+ Thread.sleep(1000);
+ if (checkFile(fileSys, file1, replicas, null, numDatanodes) == null)
{
+ break;
+ }
+ } catch (InterruptedException ie) {
+ }
+ }
+ cleanupFile(fileSys, file1);
+ assertTrue("Checked if node was recommissioned " + tries + " times.",
+ tries < 20);
{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
> Labels: blockmanagement, replication
> Fix For: 0.22.0
>
> Attachments: HDFS-2290_0.22.patch, HDFS-2290_022.patch,
> HDFS-2290_022.patch, HDFS-2290_trunk.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