Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9308

Add truncateMeta() and deleteMeta() to MiniDFSCluster

    Details

    • 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:

      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.

        Attachments

        1. HDFS-9308.001.patch
          5 kB
          Tony Wu
        2. HDFS-9308.002.patch
          11 kB
          Tony Wu
        3. HDFS-9308.003.patch
          12 kB
          Tony Wu

          Activity

            People

            • Assignee:
              twu Tony Wu
              Reporter:
              twu Tony Wu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: