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

TestNNStorageRetentionManager#testPurgeMultipleDirs fails

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0-beta
    • Fix Version/s: 2.4.0
    • Component/s: test
    • Labels:
      None
    • Environment:

      Red Hat Enterprise 6 with Sun Java 1.7 and IBM java 1.6

    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      The test o.a.h.hdfs.server.namenode.TestNNStorageRetentionManager uses a HashMap(dirRoots) to store the root storages to be mocked for the purging test, which does not have any predictable order. The directories needs be purged are stored in a LinkedHashSet, which has a predictable order. So, when the directories get mocked for the test, they could be already out of
      the order that they were added. Thus, the order that the directories were
      actually purged and the order of them being added to the LinkedHashList could
      be different and cause the test to fail.

        Attachments

        1. HDFS-5244.patch
          0.9 kB
          Jinghui Wang

          Activity

            People

            • Assignee:
              jwang302 Jinghui Wang
              Reporter:
              jwang302 Jinghui Wang
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: