Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-2928 YARN Timeline Service v.2: alpha 1
  3. YARN-3726

Fix TestHBaseTimelineWriterImpl unit test failure by fixing it's test data

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha1
    • Component/s: timelineserver
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      There is a very fascinating bug that was introduced by the test data in the metrics time series check in the unit test in TestHBaseTimelineWriterImpl in YARN-3411.

      The unit test failure seen is

      Error Message
      expected:<1> but was:<6>
      Stacktrace
      java.lang.AssertionError: expected:<1> but was:<6>
      	at org.junit.Assert.fail(Assert.java:88)
      	at org.junit.Assert.failNotEquals(Assert.java:743)
      	at org.junit.Assert.assertEquals(Assert.java:118)
      	at org.junit.Assert.assertEquals(Assert.java:555)
      	at org.junit.Assert.assertEquals(Assert.java:542)
      	at org.apache.hadoop.yarn.server.timelineservice.storage.TestHBaseTimelineWriterImpl.checkMetricsTimeseries(TestHBaseTimelineWriterImpl.java:219)
      	at org.apache.hadoop.yarn.server.timelineservice.storage.TestHBaseTimelineWriterImpl.testWriteEntityToHBase(TestHBaseTimelineWriterImpl.java:204)
      
      

      The test data had 6 timestamps that belonged to 22nd April 2015. When the patch in YARN-3411 was submitted and tested by Hadoop QA on May 19th, the unit test was working fine. Fast forward a few more days and the test started failing. There has been no relevant code change or package version change interim. The change that is triggering the unit test failure is the passage of time.

      The reason for test failure is that the metrics time series data lives in a column family which has a TTL set to 30 days. Metrics time series data was written to the mini hbase cluster with cell timestamps set to April 22nd. Based on the column family configuration, hbase started deleting the data that was older than 30 days and the test started failing. The last value is retained, hence there is one value fetched from hbase.

      Will submit a patch with the test case fixed shortly.

        Attachments

          Activity

            People

            • Assignee:
              vrushalic Vrushali C
              Reporter:
              vrushalic Vrushali C
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: