Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
HA branch (HDFS-1623)
-
None
-
Reviewed
Description
When the MiniDFSCluster is formtting an HA cluster, it formats the first NN, and then copies the contents of that directory to the second NNs name dirs. However, the second NNs name dirs are not emptied first, and thus a previous test's state may interfere with the test.
Here's a patch which addresses the issue.
This was discovered because of the commit of
HDFS-2952. I didn't notice this problem because when I ran the HA tests, it just so happened that TestDFSUpgradeWithHA was run last, and thus it did not interfere with any other test. To test this patch, I ran the following, which results in TestDFSUpgradeWithHA running before the other test:Without this patch, TestDNFencingWithReplication should fail.