anoopsjohn commented on a change in pull request #707: HBASE-23066 Allow cache
on write during compactions when prefetching …
URL: https://github.com/apache/hbase/pull/707#discussion_r334747916
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java
##########
@@ -319,6 +337,13 @@ public boolean shouldPrefetchOnOpen() {
return this.prefetchOnOpen;
}
+ /**
+ * @return true if blocks should be cached while writing during compaction,
false if not
+ */
+ public boolean shouldCacheCompactedBlocksOnWrite() {
+ return this.prefetchCompactedDataOnWrite && this.prefetchOnOpen;
Review comment:
Actually the cache size should be much bigger than the hot data set size if
u want to do cache on compact. Because the compacted away data might be
already in cache (Those are flused files or a result of another compaction).
Those are recently been accessed also (by the compaction thread). This feature
should be very carefully used.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services