Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-7136

TestMRAppMetrics should shutdown DefaultMetricsSystem after completion

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      TestMRAppMetrics should invoke shutdown method in DefaultMetricsSystem after completion. Since it can lead to failing other tests. For example, TestRMContainerAllocator#testReportedAppProgress fails when run after TestMRAppMetrics#testNames with the following error:

      org.apache.hadoop.metrics2.MetricsException: Metrics source MRAppMetrics already exists!
      

      We do not catch this on the trunk since the test TestRMContainerAllocator#testUnsupportedMapContainerRequirement run first and "DefaultMetricsSystem.shutdown();" invokes after completion. But since JUnit does not guarantee the order of the tests we should fix it. 
      Also, this is affected by previous versions which run testReportedAppProgress first (I faced it on 2.7.0 version). And reproduced on the trunk.

        Attachments

        1. image-2018-09-10-14-39-57-992.png
          213 kB
          Oleksandr Shevchenko
        2. MAPREDUCE-7136.001.patch
          1 kB
          Oleksandr Shevchenko

          Activity

            People

            • Assignee:
              oshevchenko Oleksandr Shevchenko
              Reporter:
              oshevchenko Oleksandr Shevchenko
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: