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

Duo Zhang commented on HBASE-15222:
-----------------------------------

For {{TestRpcMetrics}}, first we need to add null check for two method. One is 
{{MutableHistogram.snapshot}} and the other is 
{{MutableRangeHistogram.snapshot}}.

If the returned {{FastLongHistogram}} is null then we should not call 
updateSnapshotMetrics.

The null check can fix some of the problems. And there is still another problem 
which seems some of our metrics can only be retrieved once.

{code:title=TestRpcMetrics.java}
    mrpc.dequeuedCall(100);
    mrpc.processedCall(101);
    mrpc.totalCall(102);
    HELPER.assertCounter("queueCallTime_NumOps", 1, serverSource);
    HELPER.assertCounter("processCallTime_NumOps", 1, serverSource);
    HELPER.assertCounter("totalCallTime_NumOps", 1, serverSource);
{code}

{code:title=TestRpcMetrics.java}
    mrpc.dequeuedCall(100);
    HELPER.assertCounter("queueCallTime_NumOps", 1, serverSource);
    mrpc.processedCall(101);
    HELPER.assertCounter("processCallTime_NumOps", 1, serverSource);
    mrpc.totalCall(102);
    HELPER.assertCounter("totalCallTime_NumOps", 1, serverSource);
{code}

The former one will fail but the latter one will succeed. Is this what we 
expected? Thanks.

> Use less contended classes for metrics
> --------------------------------------
>
>                 Key: HBASE-15222
>                 URL: https://issues.apache.org/jira/browse/HBASE-15222
>             Project: HBase
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 2.0.0, 1.2.0, 1.3.0
>            Reporter: Elliott Clark
>            Assignee: Elliott Clark
>            Priority: Critical
>             Fix For: 2.0.0, 1.3.0
>
>         Attachments: HBASE-15222-v1.patch, HBASE-15222-v10.patch, 
> HBASE-15222-v11.patch, HBASE-15222-v12.patch, HBASE-15222-v13.patch, 
> HBASE-15222-v2.patch, HBASE-15222-v3.patch, HBASE-15222-v5.patch, 
> HBASE-15222-v6.patch, HBASE-15222-v8.patch, HBASE-15222-v9.patch, 
> HBASE-15222.patch
>
>
> Running the benchmarks now, but it looks like the results are pretty extreme. 
> The locking in our histograms is pretty extreme.



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

Reply via email to