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


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java:
##########
@@ -2203,6 +2204,21 @@ public Optional<Boolean> shouldCacheFile(HFileInfo 
hFileInfo, Configuration conf
     return Optional.of(!fullyCachedFiles.containsKey(fileName));
   }
 
+  @Override
+  public Optional<Boolean> shouldCacheBlock(BlockCacheKey key, Configuration 
conf) {
+    try {
+      DataTieringManager dataTieringManager = DataTieringManager.getInstance();
+      if (dataTieringManager != null && !dataTieringManager.isHotData(key, 
conf)) {

Review Comment:
   On a file based bucket cache over an ephemeral storage of 1.6TB capacity and 
a typical block size of 64KB, we may get up to 26M blocks. With 4 extra bytes 
this will add per block, we are talking about 100MB extra heap usage, which 
accounts for 0.3% of a 32GB heap on typical RS deployment, so I guess we can 
relax on this extra variable.
   
   WDYT, @jhungund ?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to