[ https://issues.apache.org/jira/browse/HDFS-8772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14630503#comment-14630503 ]
Andrew Wang commented on HDFS-8772: ----------------------------------- Hey Walter, We have this function FSNamesystem#getNumStaleStorages() which I think does what we need, see also DatanodeStorageInfo#areBlockContentsStale(). I think we could use GenericTestUtils#waitFor to wait for this to hit 0, waitFor is similar to your idea about polling every 200ms. > fix TestStandbyIsHot#testDatanodeRestarts which occasionally fails > -------------------------------------------------------------------- > > Key: HDFS-8772 > URL: https://issues.apache.org/jira/browse/HDFS-8772 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Walter Su > Assignee: Walter Su > Attachments: HDFS-8772.01.patch, HDFS-8772.02.patch > > > https://builds.apache.org/job/PreCommit-HDFS-Build/11596/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11598/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11599/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11600/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11606/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11608/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11612/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11618/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11650/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11655/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11659/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11663/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11664/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11667/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11669/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11676/testReport/ > https://builds.apache.org/job/PreCommit-HDFS-Build/11677/testReport/ > {noformat} > java.lang.AssertionError: expected:<0> but was:<4> > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.failNotEquals(Assert.java:743) > at org.junit.Assert.assertEquals(Assert.java:118) > at org.junit.Assert.assertEquals(Assert.java:555) > at org.junit.Assert.assertEquals(Assert.java:542) > at > org.apache.hadoop.hdfs.server.namenode.ha.TestStandbyIsHot.testDatanodeRestarts(TestStandbyIsHot.java:188) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)