Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.7.1
-
None
Description
A few unit tests use DataNodeTestUtils#getPendingAsyncDeletions to retrieve the number of pending async deletions. It internally calls FsDatasetTestUtil#getPendingAsyncDeletions:
public static long getPendingAsyncDeletions(FsDatasetSpi<?> fsd) { return ((FsDatasetImpl)fsd).asyncDiskService.countPendingDeletions(); }
This assumes FsDatasetImpl is (the only implementation of) FsDataset. However FsDataset is pluggable and can have other implementations.
We can abstract getting the number of async deletions in FsDatasetTestUtils.