Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Abandoned
-
None
-
None
-
None
Description
[Forked off this specific issue as a separate JIRA from HBASE-6066].
Reduce overhead of "size metric" maintained in StoreScanner.next().
if (metric != null) { HRegion.incrNumericMetric(this.metricNamePrefix + metric, copyKv.getLength()); } results.add(copyKv);
A single call to next() might fetch a lot of KVs. We can first add up the size of those KVs in a local variable and then in a finally clause increment the metric one shot, rather than updating AtomicLongs for each KV.