-
Type:
Improvement
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.7.1
-
Fix Version/s: 2.8.0, 3.0.0-alpha1
-
Component/s: test
-
Labels:None
-
Target Version/s:
HDFS-9188 introduced corruptMeta() method to make corrupting the metadata file filesystem agnostic. There should also be a truncateMeta() and deleteMeta() method in MiniDFSCluster to allow truncation of metadata files on DataNodes without writing code that's specific to underling file system. FsDatasetTestUtils#truncateMeta() is already implemented by HDFS-9188 and cam be exposed easily in MiniDFSCluster.
This will be useful for tests such as TestLeaseRecovery#testBlockRecoveryWithLessMetafile and TestCrcCorruption#testCrcCorruption.