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

Phabricator commented on HBASE-4768:
------------------------------------

mbautin has commented on the revision "[jira] [HBASE-4768] Per-(table, 
columnFamily) metrics with configurable table name inclusion".

INLINE COMMENTS
  
src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaConfigured.java:2
 FYI, "no year in copyright message" is the least frequent option in the 
current codebase, but since it doesn't really matter, I can remove the year.

      854 Copyright 2010 The Apache Software Foundation
      360 Copyright 2011 The Apache Software Foundation
      158 Copyright 2009 The Apache Software Foundation
      108 Copyright 2007 The Apache Software Foundation
       40 Copyright 2008 The Apache Software Foundation
        6 Copyright The Apache Software Foundation


  
src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaConfigured.java:37
 Fixed.
  
src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaConfigured.java:43
 Fixed.
  
src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaConfigured.java:89
 Replaced with:

          LOG.warn("Could not determine table and column family of the HFile "
              + "path " + path + ". Expecting at least "
              + HFile.MIN_NUM_HFILE_PATH_LEVELS + " path components.");

  
src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaMetrics.java:170
 Good catch. These are actually used in some metrics in hbase-89 that are not 
yet ported to trunk. Removing them from this patch.

REVISION DETAIL
  https://reviews.facebook.net/D363

                
> Per-(table, columnFamily) metrics with configurable table name inclusion
> ------------------------------------------------------------------------
>
>                 Key: HBASE-4768
>                 URL: https://issues.apache.org/jira/browse/HBASE-4768
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Mikhail Bautin
>            Assignee: Mikhail Bautin
>         Attachments: D363.1.patch, D363.2.patch, D363.3.patch
>
>
> As we kept adding more granular block read and block cache usage statistics, 
> a combinatorial explosion of various cases to monitor started to happen, 
> especially when we wanted both per-table/column family/block type statistics 
> and aggregate statistics on various subsets of these dimensions. Here, we 
> un-clutters HFile readers, LruBlockCache, StoreFile, etc. by creating a 
> centralized class that knows how to update all kinds of per-table/CF/block 
> type counters. 
> Table name and column family configuration have been pushed to a base class, 
> SchemaConfigured. This is convenient as many of existing classes that have 
> these properties (HFile readers/writers, HFile blocks, etc.) did not have a 
> base class. Whether to collect per-(table, columnFamily) or per-columnFamily 
> only metrics can be configured with the hbase.metrics.showTableName 
> configuration key. We don't expect this configuration to change at runtime, 
> so we cache the setting statically and log a warning when an attempt is made 
> to flip it once already set. This way we don't have to pass configuration to 
> a lot more places, e.g. everywhere an HFile reader is instantiated.
> Thanks to Liyin for his initial version of per-table metrics patch and a lot 
> of valuable feedback.

--
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