[ https://issues.apache.org/jira/browse/HDFS-15155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17047171#comment-17047171 ]
Haibin Huang edited comment on HDFS-15155 at 2/28/20 3:05 AM: -------------------------------------------------------------- [~elgoiri] ,thanks for reviewing this patch, i think TestDataNodeVolumeMetrics#testVolumeMetrics has checked the metrics of writIo, and it need to remove this line before building the MiniDFSCluster: {code:java} SimulatedFSDataset.setFactory(conf); {code} and you will see the different in TestDataNodeVolumeMetrics#verifyDataNodeVolumeMetrics after applying this patch, you can focus on these output line: {code:java} LOG.info("writeIoSampleCount : " + metrics.getWriteIoSampleCount()); LOG.info("writeIoMean : " + metrics.getWriteIoMean()); LOG.info("writeIoStdDev : " + metrics.getWriteIoStdDev()); {code} if need some more asserts, i will update soon was (Author: huanghaibin): I think TestDataNodeVolumeMetrics#testVolumeMetrics has checked the metrics of writIo, and it need to remove this line before building the MiniDFSCluster: {code:java} SimulatedFSDataset.setFactory(conf); {code} and you will see the different in TestDataNodeVolumeMetrics#verifyDataNodeVolumeMetrics after applying this patch, you can focus on these output line: {code:java} LOG.info("writeIoSampleCount : " + metrics.getWriteIoSampleCount()); LOG.info("writeIoMean : " + metrics.getWriteIoMean()); LOG.info("writeIoStdDev : " + metrics.getWriteIoStdDev()); {code} if need some more asserts, i will update soon, thanks for reviewing > writeIoRate of DataNodeVolumeMetrics is never used > -------------------------------------------------- > > Key: HDFS-15155 > URL: https://issues.apache.org/jira/browse/HDFS-15155 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs > Reporter: Haibin Huang > Assignee: Haibin Huang > Priority: Major > Attachments: HDFS-15155.001.patch, HDFS-15155.002.patch > > > There is some incorrect object using in DataNodeVolumeMetrics, writeIoRate is > never used and syncIoRate should be replaced by writeIoRate in the following > code: > {code:java} > // Based on writeIoRate > public long getWriteIoSampleCount() { > return syncIoRate.lastStat().numSamples(); > } > public double getWriteIoMean() { > return syncIoRate.lastStat().mean(); > } > public double getWriteIoStdDev() { > return syncIoRate.lastStat().stddev(); > } > {code} > > > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org