You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Kannan Muthukkaruppan (Created) (JIRA)" <ji...@apache.org> on 2012/01/27 02:18:40 UTC

[jira] [Created] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

getsize per-CF metric incorrectly counts compaction related reads as well 
--------------------------------------------------------------------------

                 Key: HBASE-5292
                 URL: https://issues.apache.org/jira/browse/HBASE-5292
             Project: HBase
          Issue Type: Bug
            Reporter: Kannan Muthukkaruppan


The per-CF "getsize" metric's intent was to track bytes returned per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]

However, currently, the metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:

 HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());

We should not do the above in case of compactions.


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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226542#comment-13226542 ] 

Hadoop QA commented on HBASE-5292:
----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12517792/jira-HBASE-5292-Prevent-counting-getSize-on-compacti-2012-03-09_13_26_52.patch
  against trunk revision .

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 12 new or modified tests.

    -1 javadoc.  The javadoc tool appears to have generated -123 warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    -1 findbugs.  The patch appears to introduce 159 new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

     -1 core tests.  The patch failed these unit tests:
                       org.apache.hadoop.hbase.mapreduce.TestImportTsv
                  org.apache.hadoop.hbase.mapred.TestTableMapReduce
                  org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1150//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1150//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1150//console

This message is automatically generated.
                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch, jira-HBASE-5292-Prevent-counting-getSize-on-compacti-2012-03-09_13_26_52.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199350#comment-13199350 ] 

Phabricator commented on HBASE-5292:
------------------------------------

Kannan has commented on the revision "[jira] [HBASE-5292] [89-fb] Prevent counting getSize on compactions".

  Ok, the "..getsize" issue was something Liyin fixed recently. Perhaps you are not rebased on that.

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

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Updated] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phabricator updated HBASE-5292:
-------------------------------

    Attachment: D1527.1.patch

zhiqiu requested code review of "[jira] [HBASE-5292] Prevent counting getSize on compacations".
Reviewers: Kannan, Liyin, JIRA

  Added two separate metrics for both get() and next()

  One problem is that both Get and Scan can have multiple column families.
  And this diff counts the size of multiple cfs in total (instead of per
  CF).

  Task ID: #898948

  Blame Rev:

TEST PLAN
  Passed unit tests.

  Revert Plan:

  Tags:

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

AFFECTED FILES
  src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java
  src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
  src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java

MANAGE HERALD DIFFERENTIAL RULES
  https://reviews.facebook.net/herald/view/differential/

WHY DID I GET THIS EMAIL?
  https://reviews.facebook.net/herald/transcript/3183/

Tip: use the X-Herald-Rules header to filter Herald messages in your client.

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "stack (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203277#comment-13203277 ] 

stack commented on HBASE-5292:
------------------------------

This patch is for trunk?  You going to commit Mikhail?  Seems like TestReplication failed only which is probably unrelated?
                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Mikhail Bautin (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226412#comment-13226412 ] 

Mikhail Bautin commented on HBASE-5292:
---------------------------------------

@Stack: yes, I will commit this. Sorry it's been a while.
                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199347#comment-13199347 ] 

Phabricator commented on HBASE-5292:
------------------------------------

mbautin has commented on the revision "[jira] [HBASE-5292] [89-fb] Prevent counting getSize on compactions".

  @zhiqiu: yes, please make sure we don't end up with two dots in metric names. We have had one bug of this kind in production already. Thanks!

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

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Updated] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phabricator updated HBASE-5292:
-------------------------------

    Attachment: D1617.1.patch

zhiqiu requested code review of "[jira] [HBASE-5292] Prevent counting getSize on compactions".
Reviewers: Kannan, mbautin, Liyin, JIRA

  Added two separate metrics for both get() and next(). This is done by
  refactoring on internal next() API. To be more specific, only Get.get()
  and ResultScanner.next() passes the metric name ("getsize" and
  "nextsize" repectively) to
    HRegion::RegionScanner::next(List<KeyValue>, String)

  This will eventually hit StoreScanner()::next((List<KeyValue>,
  int, String) where the metrics are counted.

  And their call paths are:

  1) Get

  HTable::get(final Get get)
  => HRegionServer::get(byte [] regionName, Get get)
  => HRegion::get(final Get get, final Integer lockid)
  => HRegion::get(final Get get)      [pass METRIC_GETSIZE to the
  callee]

  => HRegion::RegionScanner::next(List<KeyValue> outResults, String
  metric)
  => HRegion::RegionScanner::next(List<KeyValue> outResults, int limit,
  String metric)
  => HRegion::RegionScanner::nextInternal(int limit, String metric)
  => KeyValueHeap::next(List<KeyValue> result, int limit, String
  metric)
  => StoreScanner::next(List<KeyValue> outResult, int limit, String
  metric)

  2) Next

  HTable::ClientScanner::next()
  => ScannerCallable::call()
  => HRegionServer::next(long scannerId)
  => HRegionServer::next(final long scannerId, int nbRows)  [pass
  METRIC_NEXTSIZE to the callee]

  => HRegion::RegionScanner::next(List<KeyValue> outResults, String
  metric)
  => HRegion::RegionScanner::next(List<KeyValue> outResults, int limit,
  String metric)
  => HRegion::RegionScanner::nextInternal(int limit, String metric)
  => KeyValueHeap::next(List<KeyValue> result, int limit, String
  metric)
  => StoreScanner::next(List<KeyValue> outResult, int limit, String
  metric)

  Task ID: #898948

  Blame Rev:

TEST PLAN
  1. Passed unit tests.
  2. Created a testcase TestRegionServerMetrics::testGetNextSize to
  guarantee:
   * Get/Next contributes to getsize/nextsize metrics
   * Both getsize/nextsize are per Column Family
   * Flush/compaction won't affect these two metrics

  Revert Plan:

  Tags:

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

AFFECTED FILES
  src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
  src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
  src/main/java/org/apache/hadoop/hbase/regionserver/InternalScanner.java
  src/main/java/org/apache/hadoop/hbase/regionserver/KeyValueHeap.java
  src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
  src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
  src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java
  src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java

MANAGE HERALD DIFFERENTIAL RULES
  https://reviews.facebook.net/herald/view/differential/

WHY DID I GET THIS EMAIL?
  https://reviews.facebook.net/herald/transcript/3441/

Tip: use the X-Herald-Rules header to filter Herald messages in your client.

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202026#comment-13202026 ] 

Phabricator commented on HBASE-5292:
------------------------------------

mbautin has commented on the revision "[jira] [HBASE-5292] [89-fb] Prevent counting getSize on compactions".

  @zhiqiu: does this problem exist in the open-source HBase trunk? If so, could you please port this patch to trunk? If this is not applicable to trunk, could you please set the JIRA status to "resolved"? Thanks!

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

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199307#comment-13199307 ] 

Phabricator commented on HBASE-5292:
------------------------------------

Kannan has commented on the revision "[jira] [HBASE-5292] [89-fb] Prevent counting getSize on compactions".

  Zhiqui: Looks very good. A few comments inlined...

INLINE COMMENTS
  src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java:299 i think we can avoid this hashset and "contains" check later.

  Since this is all internal code, we can assume that if caller pass a non-null metric name, it is good to use.
  src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java:200 we need to a append a "." here for compatibility with old code, and for readability.

  Otherwise, the metric names will be
    cf.column_familygetsize
  instead of
    cf.column_family.getsize.
  src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java:136 nice test!
  src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java:345 as mentioned earlier, I think we can get rid of the hashset.

  Also, can we pass in null (instead of "") for all the places you don't want this metric to be  tracked. And this check would simply become:

  if (metric != null)

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

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Updated] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Mikhail Bautin (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Bautin updated HBASE-5292:
----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.94.0
           Status: Resolved  (was: Patch Available)
    
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>             Fix For: 0.94.0
>
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch, jira-HBASE-5292-Prevent-counting-getSize-on-compacti-2012-03-09_13_26_52.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226726#comment-13226726 ] 

Phabricator commented on HBASE-5292:
------------------------------------

mbautin has committed the revision "[jira] [HBASE-5292] Prevent counting getSize on compactions".

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

COMMIT
  https://reviews.facebook.net/rHBASE1299147

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>             Fix For: 0.94.0
>
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch, jira-HBASE-5292-Prevent-counting-getSize-on-compacti-2012-03-09_13_26_52.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Updated] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Zhiqiu Kong (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhiqiu Kong updated HBASE-5292:
-------------------------------

    Affects Version/s: 0.89.20100924
               Status: Patch Available  (was: Open)
    
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Updated] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phabricator updated HBASE-5292:
-------------------------------

    Attachment: D1527.3.patch

zhiqiu updated the revision "[jira] [HBASE-5292] [89-fb] Prevent counting getSize on compactions".
Reviewers: Kannan, Liyin, JIRA

  Address Kannan's comments:
  * Removed the metric name Hashset
  * Re-based on Liyin's fix of "..getsize"

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

AFFECTED FILES
  src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
  src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
  src/main/java/org/apache/hadoop/hbase/regionserver/InternalScanner.java
  src/main/java/org/apache/hadoop/hbase/regionserver/KeyValueHeap.java
  src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
  src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch, D1527.3.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199484#comment-13199484 ] 

Phabricator commented on HBASE-5292:
------------------------------------

Kannan has accepted the revision "[jira] [HBASE-5292] [89-fb] Prevent counting getSize on compactions".

  nice work Zhiqui!

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

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch, D1527.3.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199345#comment-13199345 ] 

Phabricator commented on HBASE-5292:
------------------------------------

zhiqiu has commented on the revision "[jira] [HBASE-5292] [89-fb] Prevent counting getSize on compactions".

INLINE COMMENTS
  src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java:299 Sure. Will remove this. :)
  src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java:200 I checked the implementation of generateSchemaMetricsPrefix() and found that a "." is already appended to the cf name.

      schemaMetricPrefix +=
        cfName.equals(TOTAL_KEY) ? "" : CF_PREFIX + cfName + ".";

  Actually I removed it because in the test log, I found the name is like "tbl.SizeMetricTest.cf.cf1..getsize", w/ one extra "."
  src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java:345 Yes, it will be much simpler by changing it to null. Will do this right now. :D

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

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202695#comment-13202695 ] 

Phabricator commented on HBASE-5292:
------------------------------------

zhiqiu has commented on the revision "[jira] [HBASE-5292] Prevent counting getSize on compactions".

  @mbautin Sure. I thought I need to wait for this diff to be accepted. :) I'll upload a patch ASAP.

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

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202689#comment-13202689 ] 

Phabricator commented on HBASE-5292:
------------------------------------

mbautin has commented on the revision "[jira] [HBASE-5292] Prevent counting getSize on compactions".

  @zhiqiu: thank you for submitting the trunk patch. Could you please upload a patch to the JIRA and set the JIRA status to "patch available", as I described at https://reviews.facebook.net/D1539#comment-7? Thanks!

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

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227978#comment-13227978 ] 

Hudson commented on HBASE-5292:
-------------------------------

Integrated in HBase-TRUNK #2676 (See [https://builds.apache.org/job/HBase-TRUNK/2676/])
    [jira] [HBASE-5292] Prevent counting getSize on compactions

Author: Zhiqiu Kong

Summary:
Added two separate metrics for both get() and next(). This is done by
refactoring on internal next() API. To be more specific, only Get.get()
and ResultScanner.next() passes the metric name ("getsize" and
"nextsize" repectively) to
  HRegion::RegionScanner::next(List<KeyValue>, String)

This will eventually hit StoreScanner()::next((List<KeyValue>,
int, String) where the metrics are counted.

And their call paths are:

1) Get

HTable::get(final Get get)
=> HRegionServer::get(byte [] regionName, Get get)
=> HRegion::get(final Get get, final Integer lockid)
=> HRegion::get(final Get get)      [pass METRIC_GETSIZE to the
callee]

=> HRegion::RegionScanner::next(List<KeyValue> outResults, String
metric)
=> HRegion::RegionScanner::next(List<KeyValue> outResults, int limit,
String metric)
=> HRegion::RegionScanner::nextInternal(int limit, String metric)
=> KeyValueHeap::next(List<KeyValue> result, int limit, String
metric)
=> StoreScanner::next(List<KeyValue> outResult, int limit, String
metric)

2) Next

HTable::ClientScanner::next()
=> ScannerCallable::call()
=> HRegionServer::next(long scannerId)
=> HRegionServer::next(final long scannerId, int nbRows)  [pass
METRIC_NEXTSIZE to the callee]

=> HRegion::RegionScanner::next(List<KeyValue> outResults, String
metric)
=> HRegion::RegionScanner::next(List<KeyValue> outResults, int limit,
String metric)
=> HRegion::RegionScanner::nextInternal(int limit, String metric)
=> KeyValueHeap::next(List<KeyValue> result, int limit, String
metric)
=> StoreScanner::next(List<KeyValue> outResult, int limit, String
metric)

Test Plan:
1. Passed unit tests.
2. Created a testcase TestRegionServerMetrics::testGetNextSize to
guarantee:
 * Get/Next contributes to getsize/nextsize metrics
 * Both getsize/nextsize are per Column Family
 * Flush/compaction won't affect these two metrics

Reviewed By: mbautin

Reviewers: Kannan, mbautin, Liyin, JIRA

CC: Kannan, mbautin, Liyin, zhiqiu

Differential Revision: https://reviews.facebook.net/D1617 (Revision 1299147)

     Result = FAILURE
mbautin : 
Files : 
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/InternalScanner.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/KeyValueHeap.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>             Fix For: 0.94.0
>
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch, jira-HBASE-5292-Prevent-counting-getSize-on-compacti-2012-03-09_13_26_52.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202050#comment-13202050 ] 

Phabricator commented on HBASE-5292:
------------------------------------

zhiqiu has commented on the revision "[jira] [HBASE-5292] [89-fb] Prevent counting getSize on compactions".

  @mbautin Sure. I'll port it to open-source trunk right now. Thank you so much for reminding me this. :D

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

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199258#comment-13199258 ] 

Phabricator commented on HBASE-5292:
------------------------------------

zhiqiu has commented on the revision "[jira] [HBASE-5292] [89-fb] Prevent counting getSize on compactions".

  Fixed. Thx a lot!

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

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202703#comment-13202703 ] 

Phabricator commented on HBASE-5292:
------------------------------------

zhiqiu has commented on the revision "[jira] [HBASE-5292] Prevent counting getSize on compactions".

  Patch submitted: https://issues.apache.org/jira/browse/HBASE-5292

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

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "stack (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226631#comment-13226631 ] 

stack commented on HBASE-5292:
------------------------------

+1 on commit.
                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch, jira-HBASE-5292-Prevent-counting-getSize-on-compacti-2012-03-09_13_26_52.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Updated] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Kannan Muthukkaruppan (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kannan Muthukkaruppan updated HBASE-5292:
-----------------------------------------

    Description: 
The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]

However, currently, the metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:

 HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());

We should not do the above in case of compactions.


  was:
The per-CF "getsize" metric's intent was to track bytes returned per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]

However, currently, the metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:

 HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());

We should not do the above in case of compactions.


    
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> However, currently, the metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226767#comment-13226767 ] 

Hudson commented on HBASE-5292:
-------------------------------

Integrated in HBase-TRUNK-security #133 (See [https://builds.apache.org/job/HBase-TRUNK-security/133/])
    [jira] [HBASE-5292] Prevent counting getSize on compactions

Author: Zhiqiu Kong

Summary:
Added two separate metrics for both get() and next(). This is done by
refactoring on internal next() API. To be more specific, only Get.get()
and ResultScanner.next() passes the metric name ("getsize" and
"nextsize" repectively) to
  HRegion::RegionScanner::next(List<KeyValue>, String)

This will eventually hit StoreScanner()::next((List<KeyValue>,
int, String) where the metrics are counted.

And their call paths are:

1) Get

HTable::get(final Get get)
=> HRegionServer::get(byte [] regionName, Get get)
=> HRegion::get(final Get get, final Integer lockid)
=> HRegion::get(final Get get)      [pass METRIC_GETSIZE to the
callee]

=> HRegion::RegionScanner::next(List<KeyValue> outResults, String
metric)
=> HRegion::RegionScanner::next(List<KeyValue> outResults, int limit,
String metric)
=> HRegion::RegionScanner::nextInternal(int limit, String metric)
=> KeyValueHeap::next(List<KeyValue> result, int limit, String
metric)
=> StoreScanner::next(List<KeyValue> outResult, int limit, String
metric)

2) Next

HTable::ClientScanner::next()
=> ScannerCallable::call()
=> HRegionServer::next(long scannerId)
=> HRegionServer::next(final long scannerId, int nbRows)  [pass
METRIC_NEXTSIZE to the callee]

=> HRegion::RegionScanner::next(List<KeyValue> outResults, String
metric)
=> HRegion::RegionScanner::next(List<KeyValue> outResults, int limit,
String metric)
=> HRegion::RegionScanner::nextInternal(int limit, String metric)
=> KeyValueHeap::next(List<KeyValue> result, int limit, String
metric)
=> StoreScanner::next(List<KeyValue> outResult, int limit, String
metric)

Test Plan:
1. Passed unit tests.
2. Created a testcase TestRegionServerMetrics::testGetNextSize to
guarantee:
 * Get/Next contributes to getsize/nextsize metrics
 * Both getsize/nextsize are per Column Family
 * Flush/compaction won't affect these two metrics

Reviewed By: mbautin

Reviewers: Kannan, mbautin, Liyin, JIRA

CC: Kannan, mbautin, Liyin, zhiqiu

Differential Revision: https://reviews.facebook.net/D1617 (Revision 1299147)

     Result = FAILURE
mbautin : 
Files : 
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/InternalScanner.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/KeyValueHeap.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>             Fix For: 0.94.0
>
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch, jira-HBASE-5292-Prevent-counting-getSize-on-compacti-2012-03-09_13_26_52.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197357#comment-13197357 ] 

Phabricator commented on HBASE-5292:
------------------------------------

stack has commented on the revision "[jira] [HBASE-5292] [89-fb] Prevent counting getSize on compacations".

  lgtm

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

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Updated] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phabricator updated HBASE-5292:
-------------------------------

    Attachment: D1527.2.patch

zhiqiu updated the revision "[jira] [HBASE-5292] [89-fb] Prevent counting getSize on compacations".
Reviewers: Kannan, Liyin, JIRA

  * Support per-CF getsize/nextsize
  * Add unit test to verify it works properly

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

AFFECTED FILES
  src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
  src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
  src/main/java/org/apache/hadoop/hbase/regionserver/InternalScanner.java
  src/main/java/org/apache/hadoop/hbase/regionserver/KeyValueHeap.java
  src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
  src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199255#comment-13199255 ] 

Phabricator commented on HBASE-5292:
------------------------------------

mbautin has commented on the revision "[jira] [HBASE-5292] [89-fb] Prevent counting getSize on compacations".

  Please fix the misspelling in the title :)
  Have not really reviewed the diff yet.

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

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202751#comment-13202751 ] 

Hadoop QA commented on HBASE-5292:
----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12513670/0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch
  against trunk revision .

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 12 new or modified tests.

    -1 javadoc.  The javadoc tool appears to have generated -136 warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    -1 findbugs.  The patch appears to introduce 156 new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

     -1 core tests.  The patch failed these unit tests:
                       org.apache.hadoop.hbase.replication.TestReplication

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/914//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/914//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/914//console

This message is automatically generated.
                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Mikhail Bautin (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226626#comment-13226626 ] 

Mikhail Bautin commented on HBASE-5292:
---------------------------------------

Re-run failed tests locally:

Running org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 244.11 sec
Running org.apache.hadoop.hbase.mapreduce.TestImportTsv
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 83.249 sec
Running org.apache.hadoop.hbase.mapreduce.TestTableMapReduce
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 100.749 sec
Running org.apache.hadoop.hbase.mapred.TestTableMapReduce
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 71.473 sec

Results :

Tests run: 19, Failures: 0, Errors: 0, Skipped: 0

Someone please confirm if it is OK to commit this.
                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch, jira-HBASE-5292-Prevent-counting-getSize-on-compacti-2012-03-09_13_26_52.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226416#comment-13226416 ] 

Phabricator commented on HBASE-5292:
------------------------------------

mbautin has accepted the revision "[jira] [HBASE-5292] Prevent counting getSize on compactions".

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

BRANCH
  getsize

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200094#comment-13200094 ] 

Phabricator commented on HBASE-5292:
------------------------------------

Kannan has commented on the revision "[jira] [HBASE-5292] [89-fb] Prevent counting getSize on compactions".

  ok - looks good.

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

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Updated] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Kannan Muthukkaruppan (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kannan Muthukkaruppan updated HBASE-5292:
-----------------------------------------

    Description: 
The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]

Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:

 HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());

We should not do the above in case of compactions.


  was:
The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]

However, currently, the metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:

 HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());

We should not do the above in case of compactions.


    
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Updated] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Phabricator (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phabricator updated HBASE-5292:
-------------------------------

    Attachment: D1527.4.patch

zhiqiu updated the revision "[jira] [HBASE-5292] [89-fb] Prevent counting getSize on compactions".
Reviewers: Kannan, Liyin, JIRA

  Fixed a bug that the two tests in TestRegionServerMetrics cannot be run together

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

AFFECTED FILES
  src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
  src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
  src/main/java/org/apache/hadoop/hbase/regionserver/InternalScanner.java
  src/main/java/org/apache/hadoop/hbase/regionserver/KeyValueHeap.java
  src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
  src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Kannan Muthukkaruppan
>         Attachments: D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Updated] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Zhiqiu Kong (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhiqiu Kong updated HBASE-5292:
-------------------------------

    Attachment: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch
    
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Updated] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Mikhail Bautin (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Bautin updated HBASE-5292:
----------------------------------

    Attachment: jira-HBASE-5292-Prevent-counting-getSize-on-compacti-2012-03-09_13_26_52.patch

Rebased patch for Hadoop QA testing
                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, D1527.1.patch, D1527.2.patch, D1527.3.patch, D1527.4.patch, D1617.1.patch, jira-HBASE-5292-Prevent-counting-getSize-on-compacti-2012-03-09_13_26_52.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

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

        

[jira] [Commented] (HBASE-5292) getsize per-CF metric incorrectly counts compaction related reads as well

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13448343#comment-13448343 ] 

Hudson commented on HBASE-5292:
-------------------------------

Integrated in HBase-0.94-security-on-Hadoop-23 #7 (See [https://builds.apache.org/job/HBase-0.94-security-on-Hadoop-23/7/])
    HBASE-5292 getsize per-CF metric incorrectly counts compaction related reads as well (Revision 1377205)

     Result = FAILURE
larsh : 
Files : 
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/InternalScanner.java
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/KeyValueHeap.java
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaMetrics.java
* /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
* /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java
* /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerMetrics.java

                
> getsize per-CF metric incorrectly counts compaction related reads as well 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-5292
>                 URL: https://issues.apache.org/jira/browse/HBASE-5292
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.89.20100924
>            Reporter: Kannan Muthukkaruppan
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 0001-jira-HBASE-5292-Prevent-counting-getSize-on-compacti.patch, 5292-0.94.txt, ASF.LICENSE.NOT.GRANTED--D1527.1.patch, ASF.LICENSE.NOT.GRANTED--D1527.2.patch, ASF.LICENSE.NOT.GRANTED--D1527.3.patch, ASF.LICENSE.NOT.GRANTED--D1527.4.patch, ASF.LICENSE.NOT.GRANTED--D1617.1.patch, jira-HBASE-5292-Prevent-counting-getSize-on-compacti-2012-03-09_13_26_52.patch
>
>
> The per-CF "getsize" metric's intent was to track bytes returned (to HBase clients) per-CF. [Note: We already have metrics to track # of HFileBlock's read for compaction vs. non-compaction cases -- e.g., compactionblockreadcnt vs. fsblockreadcnt.]
> Currently, the "getsize" metric gets updated for both client initiated Get/Scan operations as well for compaction related reads. The metric is updated in StoreScanner.java:next() when the Scan query matcher returns an INCLUDE* code via a:
>  HRegion.incrNumericMetric(this.metricNameGetsize, copyKv.getLength());
> We should not do the above in case of compactions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira