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

stack commented on HBASE-3614:
------------------------------

This could be final: '+  private RegionOperationMetrics regionMetrics;'?

100 chars per line.

Just pass HRegionInfo altogether to the below?

{code}
+    this.regionMetrics = new RegionOperationMetrics(conf, 
this.regionInfo.getTableNameAsString(), this.regionInfo.getEncodedName());
{code}

Err... your replacement is better than what was there previously in the below:

{code}
-    final String metricPrefix = SchemaMetrics.generateSchemaMetricsPrefix(
-        getTableDesc().getNameAsString(), familyMap.keySet());
-    if (!metricPrefix.isEmpty()) {
-      RegionMetricsStorage.incrTimeVaryingMetric(metricPrefix + "delete_", 
after - now);
-    }
+    this.regionMetrics.updateDeleteMetrics(familyMap.keySet(), after-now);
{code}

Whats happening here?

{code}
+        if (cfSet == null) {
+          cfSet = put.getFamilyMap().keySet();
+        } else {
+          cfSetConsistent = cfSetConsistent && put.equals(cfSet);
{code}

Do we have to get the column family set each time through?  It never changes 
(currently) while the region is open.

Whats a cfSetConsistent?  A comment would  help?

Yeah, I don't follow this stuff:

{code}
+      //See if the column families were consistent through the whole thing.
+      //if they were then keep them.  If they were not then pass a null.
+      //null will be treated as unknown.
{code}

Should be hbase.metrics.region.exposeOperationTimes instead of 
hbase.metrics.exposeOperationTimes to convey its on/off for per-region metrics?

This patch is great.
                
> Expose per-region request rate metrics
> --------------------------------------
>
>                 Key: HBASE-3614
>                 URL: https://issues.apache.org/jira/browse/HBASE-3614
>             Project: HBase
>          Issue Type: Improvement
>          Components: metrics, regionserver
>            Reporter: Gary Helmling
>            Assignee: Elliott Clark
>            Priority: Minor
>         Attachments: HBASE-3614-0.patch, HBASE-3614-1.patch, 
> HBASE-3614-2.patch, HBASE-3614-3.patch, HBASE-3614-4.patch, Screen Shot 
> 2012-04-17 at 2.41.27 PM.png
>
>
> We currently export metrics on request rates for each region server, and this 
> can help with identifying uneven load at a high level. But once you see a 
> given server under high load, you're forced to extrapolate based on your 
> application patterns and the data it's serving what the likely culprit is.  
> This can and should be much easier if we just exported request rate metrics 
> per-region on each server.
> Dynamically updating the metrics keys based on assigned regions may pose some 
> minor challenges, but this seems a very valuable diagnostic tool to have 
> available.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to