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

Gary Helmling commented on HBASE-16661:
---------------------------------------

A couple comments on the patch:

1) In MetricsRegionWrapperImpl:
{code}
public long getLastMajorCompactionAge() {
    return this.region.getOldestHfileTs(true);
}
{code}

In order to make this return the age and not just the timestamp, you'll have to 
subtract it from the current timestamp (use 
{{EnvironmentEdgeManager.currentTime()}}),  See {{HStore.getMaxStoreFileAge()}} 
for an example.

2) In HRegion.getOldestHfileTs():
Failure to load the file info could be a sign of a bigger problem, like a 
corrupt HFile, so I think it's better not to catch the IOException in here.  I 
think it's better to let the IOException be thrown and have 
MetricsRegionWrapperImpl catch it and log.


> Add last major compaction age to per-region metrics
> ---------------------------------------------------
>
>                 Key: HBASE-16661
>                 URL: https://issues.apache.org/jira/browse/HBASE-16661
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Gary Helmling
>            Assignee: Dustin Pho
>            Priority: Minor
>         Attachments: HBASE-16661.001.patch
>
>
> After HBASE-12859, we can now track the last major compaction timestamp for 
> each region.  However, this is only exposed through cluster status reporting 
> and the admin API.
> We have similar per-region metrics around storefile age, but none that 
> filters on major compaction specifically.
> Let's add a metric for last major compaction age.



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

Reply via email to