[
https://issues.apache.org/jira/browse/HDFS-13908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16619342#comment-16619342
]
Íñigo Goiri commented on HDFS-13908:
------------------------------------
[~ayushtkn], I actually went through the full class and I see that in
{{testDNWithInvalidStorageWithHA()}} there is another sleep of 10 seconds, so
we could cut this down another good chunk.
Right now, it does:
{code}
cluster.restartDataNode(dnProp);
// let the initialization be complete
Thread.sleep(10000);
dn = cluster.getDataNodes().get(0);
assertFalse("Datanode should have shutdown as only service failed",
dn.isDatanodeUp());
{code}
We could do:
{code}
cluster.restartDataNode(dnProp);
// Datanode should have shutdown as only service failed
GenericTestUtils.waitFor(() -> !dn.isDatanodeUp(), 500, 10000);
{code}
The only problem is that I believe branch-2.9 does not support these lambdas so
we would need a {{new Supplier<>()}} patch for that.
The class also has a couple sleeps in {{testClusterIdMismatch()}} but it is not
that bad.
> TestDataNodeMultipleRegistrations is flaky
> ------------------------------------------
>
> Key: HDFS-13908
> URL: https://issues.apache.org/jira/browse/HDFS-13908
> Project: Hadoop HDFS
> Issue Type: New Feature
> Reporter: Íñigo Goiri
> Assignee: Ayush Saxena
> Priority: Major
> Attachments: Above Timeout.rar, HDFS-13908-01.patch,
> HDFS-13908-02.patch, HDFS-13908-03.patch, HDFS-13908-04.patch, Within
> TImeout.rar
>
>
> We have seen this issue in multiple runs:
> https://builds.apache.org/job/PreCommit-HADOOP-Build/15146/testReport/org.apache.hadoop.hdfs.server.datanode/TestDataNodeMultipleRegistrations/testClusterIdMismatchAtStartupWithHA/
> https://builds.apache.org/job/PreCommit-HADOOP-Build/15116/testReport/org.apache.hadoop.hdfs.server.datanode/TestDataNodeMultipleRegistrations/testDNWithInvalidStorageWithHA/
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]