hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yi Deng (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-12133) Add FastLongHistogram for metric computation
Date Wed, 01 Oct 2014 06:37:34 GMT

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

Yi Deng commented on HBASE-12133:

[~stack] Thanks for commenting.

We're going to use it to compute a P99/P95 metric every one minute. The whole design is to
make a none-synchronized version of histogram collecting.

About the updateMin/updateMax, the implementation is same as what the blog shows and it is
good for me. People there are mainly concerning about whether that should be part of JDK.

In practice, even if a lot of threads are calling the same method, all of them could finish
without many retrying, because the retry only happened if
1) the value needs to be change (i.e. new value is smaller than the current minimum). Actually,
most of the thread will not try to change the value at all.
2) some other thread change the current value(not just execute parralelly), AFTER the current
value is taken out and BEFORE the new value is sucessfully compared and set. Since the code
here is so fast that we can be optimistic that it only happens with a very small probabilty.
(but we don't assume it never happen)
3) since the value is changing to a single direction (keep decreasing for updateMin), it is
very likely in the next retry (because the value has been changed smaller), the updated value
has been samller or equal to the value to be set to, and then quit the loop. 

> Add FastLongHistogram for metric computation
> --------------------------------------------
>                 Key: HBASE-12133
>                 URL: https://issues.apache.org/jira/browse/HBASE-12133
>             Project: HBase
>          Issue Type: New Feature
>          Components: metrics
>    Affects Versions: 0.98.8
>            Reporter: Yi Deng
>            Assignee: Yi Deng
>            Priority: Minor
>              Labels: histogram, metrics
>             Fix For: 0.98.8
>         Attachments: 0001-Add-FastLongHistogram-for-fast-histogram-estimation.patch
> FastLongHistogram is a thread-safe class that estimate distribution of data and computes
the quantiles. It's useful for computing aggregated metrics like P99/P95.

This message was sent by Atlassian JIRA

View raw message