hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yiqun Lin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-11657) Ozone: Add unit test for storage container metrics
Date Sat, 15 Apr 2017 08:43:42 GMT

     [ https://issues.apache.org/jira/browse/HDFS-11657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Yiqun Lin updated HDFS-11657:
    Attachment: HDFS-11657-HDFS-7240.001.patch

When working on adding the unit test, I found one bug in {{ContainerMetrics}}. The current
container type is from {{1}} ~ {{17}}, but it's not initialized correctly in {{ContainerMetrics}}
constructor method.
for (int i = 0; i < numEnumEntries; i++) {
      numOpsArray[i] = registry.newCounter(
          "num" + ContainerProtos.Type.valueOf(i),   <==== here var 'i' should be 'i+1'
since the value of type is range from 1 rather than 0. This will let the counter value of
metric isn't corresponding to its name. 

Attach the patch with also fixing the bug found above. Thanks for the review.

> Ozone: Add unit test for storage container metrics
> --------------------------------------------------
>                 Key: HDFS-11657
>                 URL: https://issues.apache.org/jira/browse/HDFS-11657
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone, test
>    Affects Versions: HDFS-7240
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>         Attachments: HDFS-11657-HDFS-7240.001.patch
> We need one additional unit test specified for storage contained metrics that introduced
in HDFS-11463. We can add test methods under this test class if we add other container metrics
in the future.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org

View raw message