[
https://issues.apache.org/jira/browse/HDFS-4275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13528389#comment-13528389
]
Chris Nauroth commented on HDFS-4275:
-------------------------------------
Thank you, Arpit and Xuan.
The double tearDown is problematic, because it causes a race condition on
trying to delete an open directory, ultimately failing the assertion in
{{tearDown}} with "Cannot delete data-node dirs". This fails specifically on
Windows because of its file locking policy.
The file in question is the same verification log mentioned in HDFS-4274. The
patch I uploaded there takes care of closing the file, but it happens in a
separate thread started by {{DataBlockScanner}}. This is asynchronous of the
main JUnit thread, so we don't know deterministically when the file will be
closed.
For other tests, this has not been a problem. Presumably, that is because
other tests consistently use {{MiniDFSCluster}} to manage this.
{{TestBlockRecovery}} is a bit different in that most of its tests start a
{{DataNode}} directly, but then
{{testRaceBetweenReplicaRecoveryAndFinalizeBlock}} immediately shuts it down
and uses a {{MiniDFSCluster}} instead.
> MiniDFSCluster-based tests fail on Windows due to failure to delete test name
> node directory
> --------------------------------------------------------------------------------------------
>
> Key: HDFS-4275
> URL: https://issues.apache.org/jira/browse/HDFS-4275
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: namenode
> Affects Versions: 3.0.0, trunk-win
> Reporter: Chris Nauroth
> Assignee: Chris Nauroth
> Attachments: HDFS-4275.1.patch
>
>
> Multiple HDFS test suites fail on Windows during initialization of
> {{MiniDFSCluster}} due to "Could not fully delete" the name testing data
> directory.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira