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

HaiBin Huang updated HDFS-14612:
--------------------------------
    Description: 
I found SlowDiskReport won't update when slowDisks is always empty in 
org.apache.hadoop.hdfs.server.blockmanagement.*handleHeartbeat*, this may lead 
to outdated SlowDiskReport alway staying in jmx of namenode until next time 
slowDisks isn't empty. So i think this method 
*checkAndUpdateReportIfNecessary()* should be called firstly when we want to 
get the jmx information about SlowDiskReport, this can keep the SlowDiskReport 
on jmx is alway valid.

 

There is also some incorrect object reference on 
org.apache.hadoop.hdfs.server.datanode.fsdataset.

*DataNodeVolumeMetrics*
{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}
 

 

  was:
I found SlowDiskReport won't update when slowDisks is always empty in 
org.apache.hadoop.hdfs.server.blockmanagement.*handleHeartbeat*, this may lead 
to outdated SlowDiskReport alway staying in jmx of namenode until next time 
slowDisks isn't empty. So i think this method 
*checkAndUpdateReportIfNecessary()* should be called firstly when we want to 
get the jmx information about SlowDiskReport, instead of when we found some 
slowdisk isn't empty ,this can keep the SlowDiskReport on jmx is alway valid.

 

There is also some incorrect object reference on 
org.apache.hadoop.hdfs.server.datanode.fsdataset.

*DataNodeVolumeMetrics*
{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}
 

 


> SlowDiskReport won't update when SlowDisks is always empty in heartbeat
> -----------------------------------------------------------------------
>
>                 Key: HDFS-14612
>                 URL: https://issues.apache.org/jira/browse/HDFS-14612
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: HaiBin Huang
>            Priority: Major
>         Attachments: HDFS-14612-001.patch, HDFS-14612.patch
>
>
> I found SlowDiskReport won't update when slowDisks is always empty in 
> org.apache.hadoop.hdfs.server.blockmanagement.*handleHeartbeat*, this may 
> lead to outdated SlowDiskReport alway staying in jmx of namenode until next 
> time slowDisks isn't empty. So i think this method 
> *checkAndUpdateReportIfNecessary()* should be called firstly when we want to 
> get the jmx information about SlowDiskReport, this can keep the 
> SlowDiskReport on jmx is alway valid.
>  
> There is also some incorrect object reference on 
> org.apache.hadoop.hdfs.server.datanode.fsdataset.
> *DataNodeVolumeMetrics*
> {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
(v7.6.3#76005)

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

Reply via email to