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

Heng Chen commented on HBASE-15635:
-----------------------------------

check the code today,  and found that the mean is calculated by total/count
total is updated when one age added.  
{code}
      private final long now = System.nanoTime();
     ......
      long age = this.now - cb.getCachedTime();
      this.hist.add(age, 1);
{code}

I think the {{total}}  may exceeds the Long.MAX_VALUE.  

Due to the unit for this metics is seconds,  maybe we could change {{age}} from 
nanoSeconds to Seconds.






> Mean age of Blocks in cache (seconds) on webUI should be greater than zero
> --------------------------------------------------------------------------
>
>                 Key: HBASE-15635
>                 URL: https://issues.apache.org/jira/browse/HBASE-15635
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.98.17
>            Reporter: Heng Chen
>            Assignee: Heng Chen
>         Attachments: 7BFFAF68-0807-400C-853F-706B498449E1.png
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to