[
https://issues.apache.org/jira/browse/HDFS-11399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yiqun Lin updated HDFS-11399:
-----------------------------
Attachment: HDFS-11399.002.patch
Thanks for the review, [~brahmareddy]!
I tested the patch in my local many times. I found it was not a good way to
just adding {{assumeNotWindows}} into
{{DataNodeTestUtils#injectDataDirFailure}}. That will lead some cleanup code
could not be executed. So I plan to add the missing operation
{{assumeNotWindows}} in test methods. This should be a safe way. I checked the
tests that used {{DataNodeTestUtils#injectDataDirFailure}}, and make a quick
fix. Only one test
{{TestDataNodeVolumeMetrics#testVolumeMetricsWithVolumeDepartureArrival}}, it
already runs well without the change.
Attach the patch.
> Many tests fails in Windows due to injecting disk failures
> ----------------------------------------------------------
>
> Key: HDFS-11399
> URL: https://issues.apache.org/jira/browse/HDFS-11399
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 3.0.0-alpha2
> Reporter: Yiqun Lin
> Assignee: Yiqun Lin
> Attachments: HDFS-11399.001.patch, HDFS-11399.002.patch
>
>
> Found many tests run failed in Windows due to using
> {{DataNodeTestUtils#injectDataDirFailure}}. One of the failure test:
> {code}
> java.io.IOException: Failed to rename
> D:\work-project\hadoop\hadoop-hdfs-project\hadoop-hdfs\target\test\data\dfs\data\data2
> to
> D:\work-project\hadoop\hadoop-hdfs-project\hadoop-hdfs\target\test\data\dfs\data\data2.origin.
> at
> org.apache.hadoop.hdfs.server.datanode.DataNodeTestUtils.injectDataDirFailure(DataNodeTestUtils.java:156)
> at
> org.apache.hadoop.hdfs.server.blockmanagement.TestBlockStatsMXBean.testStorageTypeStatsWhenStorageFailed(TestBlockStatsMXBean.java:176)
> {code}
> The root cause of this is that the test method uses
> {{DataNodeTestUtils#injectDataDirFailure}} to injects disk failures but
> however missing the compare operation {{assumeNotWindows}}. Currently
> {{DataNodeTestUtils#injectDataDirFailure}} is not supported in Windows then
> the test fails.
> It would be better to add {{assumeNotWindows}} into
> {{DataNodeTestUtils#injectDataDirFailure}} in case we forget to add this in
> test methods.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]