Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12602

TestMetricsSystemImpl#testQSize occasionally fail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 2.7.3, 3.0.0-alpha1
    • test
    • None
    • Reviewed

    Description

      I have seen this test failed a few times in the past.
      Error Message

      metricsSink.putMetrics(<Capturing argument>);
      Wanted 2 times:
      -> at org.apache.hadoop.metrics2.impl.TestMetricsSystemImpl.testQSize(TestMetricsSystemImpl.java:472)
      But was 1 time:
      -> at org.apache.hadoop.metrics2.impl.MetricsSinkAdapter.consume(MetricsSinkAdapter.java:183)
      

      Stacktrace

      org.mockito.exceptions.verification.TooLittleActualInvocations: 
      metricsSink.putMetrics(<Capturing argument>);
      Wanted 2 times:
      -> at org.apache.hadoop.metrics2.impl.TestMetricsSystemImpl.testQSize(TestMetricsSystemImpl.java:472)
      But was 1 time:
      -> at org.apache.hadoop.metrics2.impl.MetricsSinkAdapter.consume(MetricsSinkAdapter.java:183)
      
      	at org.apache.hadoop.metrics2.impl.TestMetricsSystemImpl.testQSize(TestMetricsSystemImpl.java:472)
      

      Standard Output

      2015-11-25 19:07:49,867 INFO  impl.MetricsConfig (MetricsConfig.java:loadFirst(115)) - loaded properties from hadoop-metrics2-test.properties
      2015-11-25 19:07:49,932 INFO  impl.MetricsSystemImpl (MetricsSystemImpl.java:startTimer(374)) - Scheduled snapshot period at 10 second(s).
      2015-11-25 19:07:49,932 INFO  impl.MetricsSystemImpl (MetricsSystemImpl.java:start(192)) - Test metrics system started
      2015-11-25 19:07:50,134 INFO  impl.MetricsSinkAdapter (MetricsSinkAdapter.java:start(203)) - Sink slowSink started
      2015-11-25 19:07:50,135 INFO  impl.MetricsSystemImpl (MetricsSystemImpl.java:registerSink(301)) - Registered sink slowSink
      2015-11-25 19:07:50,135 INFO  impl.MetricsSinkAdapter (MetricsSinkAdapter.java:start(203)) - Sink dataSink started
      2015-11-25 19:07:50,136 INFO  impl.MetricsSystemImpl (MetricsSystemImpl.java:registerSink(301)) - Registered sink dataSink
      2015-11-25 19:07:50,746 INFO  impl.MetricsSystemImpl (MetricsSystemImpl.java:stop(211)) - Stopping Test metrics system...
      2015-11-25 19:07:50,747 INFO  impl.MetricsSinkAdapter (MetricsSinkAdapter.java:publishMetricsFromQueue(140)) - slowSink thread interrupted.
      2015-11-25 19:07:50,748 INFO  impl.MetricsSinkAdapter (MetricsSinkAdapter.java:publishMetricsFromQueue(140)) - dataSink thread interrupted.
      2015-11-25 19:07:50,748 INFO  impl.MetricsSystemImpl (MetricsSystemImpl.java:stop(217)) - Test metrics system stopped.
      

      Attachments

        1. HADOOP-12602.001.patch
          0.9 kB
          Masatake Iwasaki

        Activity

          People

            iwasakims Masatake Iwasaki
            weichiu Wei-Chiu Chuang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: