Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.7.1
-
None
Description
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.