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

Elliott Clark commented on HBASE-14082:
---------------------------------------

I'm really against adding anything more to that metric name. It's already too 
ugly.

If anything we should be removing and moving into a different bean. So 
something like:

{code}
"name_to_replica_id" {
"aaabbb": 0,
"bbbccc": 2,
},
"name_to_namspace" {
"aaabbb": "default",
"bbbccc": "default",
},
"name_to_table" {
"aaabbb": "foo",
"bbbccc": "bar",
},
"RegionMetrics": {
"aaabbb_mutateCount": 100,
"bbbccc_mutateCount": 100,
}
{code}

However that would be a breaking change, better in a 2.0. Until then we can do:

{code}
"name_to_replica_id" {
"aaabbb": 0,
"bbbccc": 2,
},
"RegionMetrics": {
"namespace_default_table_foo_region_aaabbb_metric_mutateCount": 100,
"namespace_default_table_foo_region_bbbccc_metric_mutateCount": 100,
}
{code}

> Add replica id to JMX metrics names
> -----------------------------------
>
>                 Key: HBASE-14082
>                 URL: https://issues.apache.org/jira/browse/HBASE-14082
>             Project: HBase
>          Issue Type: Improvement
>          Components: metrics
>            Reporter: Lei Chen
>            Assignee: Lei Chen
>         Attachments: HBASE-14082-v1.patch, HBASE-14082-v2.patch
>
>
> Today, via JMX, one cannot distinguish a primary region from a replica. A 
> possible solution is to add replica id to JMX metrics names. The benefits may 
> include, for example:
> # Knowing the latency of a read request on a replica region means the first 
> attempt to the primary region has timeout.
> # Write requests on replicas are due to the replication process, while the 
> ones on primary are from clients.
> # In case of looking for hot spots of read operations, replicas should be 
> excluded since TIMELINE reads are sent to all replicas.
> To implement, we can change the format of metrics names found at 
> {code}Hadoop->HBase->RegionServer->Regions->Attributes{code}
> from 
> {code}namespace_<namespace>_table_<tablename>_region_<regionname>_metric_<metricname>{code}
> to
> {code}namespace_<namespace>_table_<tablename>_region_<regionname>_replicaid_<replicaid>_metric_<metricname>{code}



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

Reply via email to