Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
The test TestDiskspaceQuotaUpdate fails sometimes after HDFS-10843, the link addresse: https://builds.apache.org/job/PreCommit-HDFS-Build/17200/testReport/. The stack infos:
java.net.BindException: Problem binding to [localhost:49195] java.net.BindException: Address already in use; For more details see: http://wiki.apache.org/hadoop/BindException
I found the bind exception was happened in new test method TestDiskspaceQuotaUpdate.testQuotaIssuesWhileCommitting. The related codes:
public void testQuotaIssuesWhileCommitting() throws Exception { ... try { for (int i = REPLICATION - 1; i > 0; i--) { dnprops.add(cluster.stopDataNode(i)); } ... } finally { for (MiniDFSCluster.DataNodeProperties dnprop : dnprops) { cluster.restartDataNode(dnprop, true); } cluster.waitActive(); } }
I think we can make a simple fix in cluster.restartDataNode(dnprop, true);. The tests in TestDiskspaceQuotaUpdate just care about that if the cluster is up and running. So I think this change will not influence the current logic,