Details
-
Bug
-
Status: Resolved
-
Trivial
-
Resolution: Not A Bug
-
2.0.0-alpha-3
-
None
-
None
Description
The latest version of LruBolckCache, I found the code logic of cache too big bolcks is inconsistent with annotation.
If follow the notes, the code should look like this:
if (buf.heapSize() > maxBlockSize) {
// If there are a lot of blocks that are too
// big this can make the logs way too noisy.
// So we log 2%
if (stats.failInsert() % 50 != 0)
LOG.warn("Trying to cache too large a block "
+ cacheKey.getHfileName() + " @ "
+ cacheKey.getOffset()
+ " is " + buf.heapSize()
+ " which is larger than " + maxBlockSize);
}