You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "wchevreuil (via GitHub)" <gi...@apache.org> on 2025/10/02 08:56:40 UTC

Re: [PR] HBASE-29585 Add row-level cache for the get operation [hbase]

wchevreuil commented on code in PR #7291:
URL: https://github.com/apache/hbase/pull/7291#discussion_r2394167597


##########
hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon:
##########
@@ -562,3 +568,55 @@ Increase that value to get a complete picture.
 </p>
 </%def>
 
+<%def row_cache_stats>
+<%args>
+    RowCache rowCache;
+</%args>
+<%if rowCache == null %>
+<p>RowCache is null</p>

Review Comment:
   Should we rather say: "RowCache disabled"?



##########
hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerSourceImpl.java:
##########
@@ -452,6 +452,12 @@ public void getMetrics(MetricsCollector metricsCollector, boolean all) {
         .addCounter(Interns.info(BLOCK_CACHE_DELETE_FAMILY_BLOOM_HIT_COUNT, ""),
           rsWrap.getDeleteFamilyBloomHitCount())
         .addCounter(Interns.info(BLOCK_CACHE_TRAILER_HIT_COUNT, ""), rsWrap.getTrailerHitCount())
+        .addCounter(Interns.info(ROW_CACHE_HIT_COUNT, ""), rsWrap.getRowCacheHitCount())
+        .addCounter(Interns.info(ROW_CACHE_MISS_COUNT, ""), rsWrap.getRowCacheMissCount())
+        .addCounter(Interns.info(ROW_CACHE_EVICTED_ROW_COUNT, ""),
+          rsWrap.getRowCacheEvictedRowCount())
+        .addGauge(Interns.info(ROW_CACHE_SIZE, ""), rsWrap.getRowCacheSize())
+        .addGauge(Interns.info(ROW_CACHE_COUNT, ""), rsWrap.getRowCacheCount())

Review Comment:
   Nice!



##########
hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon:
##########
@@ -68,6 +71,9 @@ org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
         <div class="tab-pane" id="tab_bc_l2" role="tabpanel">
             <& bc_l; bc = bcs == null? null: bcs.length <= 1? null: bcs[1]; name = "L2"; evictions = evictions; &>
         </div>
+        <div class="tab-pane" id="tab_row_cache" role="tabpanel">
+            <& row_cache_stats; rowCache = rowCache &>
+        </div>

Review Comment:
   Nit: We may need to rename the labels here. Where we current say "Block Cache" should be only "Cache", then on L1/L2 tabs should be labeled "BlockCache L1"/"BlockCache L2".



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org