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

Refactor TestWriteToReplica and TestFsDatasetImpl to avoid explicitly creating Files in tests code.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • 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:
    • Hadoop Flags:
      Reviewed

      Description

      In TestWriteToReplica and TestFsDatasetImpl, tests directly creates block and metadata files:

      replicaInfo.getBlockFile().createNewFile();
      replicaInfo.getMetaFile().createNewFile();
      

      It leaks the implementation details of FsDatasetImpl. This JIRA proposes to use FsDatasetImplTestUtils (HDFS-9188) to create replicas.

        Attachments

        1. HDFS-9251.00.patch
          24 kB
          Lei (Eddy) Xu
        2. HDFS-9251.01.patch
          24 kB
          Lei (Eddy) Xu
        3. HDFS-9251.02.patch
          24 kB
          Lei (Eddy) Xu

          Activity

            People

            • Assignee:
              eddyxu Lei (Eddy) Xu
              Reporter:
              eddyxu Lei (Eddy) Xu
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: