jhungund commented on code in PR #5866:
URL: https://github.com/apache/hbase/pull/5866#discussion_r1601142345
##########
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:
@vinayakphegde, @wchevreuil,
We are only transiently using the timestamp within BlockCacheKey in this
API. But, we are keeping this value permanently in the BlockCacheKey increasing
the size of the BlockCacheKey and keeping the timestamp redundantly, which will
not be used later. This overhead can be avoided by passing the required data as
arguments to this function shouldCacheBlock.
All we need is this type of a function:
`shouldCacheBlock(long timestamp, long age or conf)`
wouldn't it make sense to not increase the size of BlockCacheKey permanently?
--
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]