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


##########
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:
   All we need is a call to
   `hotDataValidator(maxTimestamp, getDataTieringHotDataAge(configuration));` 
to decide whether to cache the block or not. We already have the maxTimestamp 
and age handy at the caller of shouldCacheBlock.



-- 
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-unsubscr...@hbase.apache.org

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

Reply via email to