[ 
https://issues.apache.org/jira/browse/HDFS-12247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16111747#comment-16111747
 ] 

Xiaoyu Yao commented on HDFS-12247:
-----------------------------------

Thanks [~linyiqun] for reporting the issue and posting for it. The patch makes 
the test pass but hide a real code bug. 

This test restarts the MiniOzoneCluster for each of the 3 groups of separate 
tests on vol/bucket/key operations. This exposes a bug in KSMMetrics that does 
not unRegistered "KSMMetrics" from the DefaultMetricsSystem upon KSM stop after 
each test. The right patch should fix the code bug by adding 
KSMMetrics#unRegister() and ensure it is called from KeySpaceManager#stop().

{code}
  public void unRegister() {
    MetricsSystem ms = DefaultMetricsSystem.instance();
    ms.unregisterSource("KSMMetrics");
  }
{code}

> Ozone: TestKSMMetrcis fails constantly
> --------------------------------------
>
>                 Key: HDFS-12247
>                 URL: https://issues.apache.org/jira/browse/HDFS-12247
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>    Affects Versions: HDFS-7240
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>         Attachments: HDFS-12247-HDFS-7240.001.patch
>
>
> The test {{TestKSMMetrcis#[.testVolumeOps,.testKeyOps]}} fails constantly 
> recently. The stack info:
> {noformat}
> java.lang.AssertionError: Bad value for metric NumVolumeOps expected:<6> but 
> was:<0>
>       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.apache.hadoop.test.MetricsAsserts.assertCounter(MetricsAsserts.java:227)
>       at 
> org.apache.hadoop.ozone.ksm.TestKSMMetrcis.testVolumeOps(TestKSMMetrcis.java:89)
> {noformat}
> Seemed after the commit of HDFS-12034, the failures appeared.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to