Uh oh!
There was an error while loading. Please reload this page.
HBASE-28600 Introduce hfile.block.cache.memory.size configuration - #6422
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ndimiduk
left a comment
There was a problem hiding this comment.
This looks really good. I have just some small comments. Have you tried it out? Is it working for you?
| if (usage != null) { | ||
| max = usage.getMax(); | ||
| } | ||
| final long heapMax = usage != null ? usage.getMax() : -1; |
There was a problem hiding this comment.
Should we throw when heapMax == -1? We don't have any safety on subsequent divide by -1, below.
There was a problem hiding this comment.
What do you think of immediately returning -1 in this case?
We expect this method to return a negative value when the cache is disabled.
| if (blockCachePercent < blockCachePercentMinRange) { | ||
| LOG.warn("Setting " + BLOCK_CACHE_SIZE_MIN_RANGE_KEY + " to " + blockCachePercent | ||
| + ", same value as " + HFILE_BLOCK_CACHE_SIZE_KEY | ||
| + " (lookup order: " + HFILE_BLOCK_CACHE_MEMORY_SIZE_KEY + " -> " |
There was a problem hiding this comment.
nit: please cleanup any modified log lines to use modern style parameter substitution.
jinhyukify
left a comment
There was a problem hiding this comment.
Have you tried it out? Is it working for you?
I briefly wrote down the developer test I performed on my local machine.
You can check it in this comment
| if (blockCachePercent < blockCachePercentMinRange) { | ||
| LOG.warn("Setting " + BLOCK_CACHE_SIZE_MIN_RANGE_KEY + " to " + blockCachePercent | ||
| + ", same value as " + HFILE_BLOCK_CACHE_SIZE_KEY | ||
| + " (lookup order: " + HFILE_BLOCK_CACHE_MEMORY_SIZE_KEY + " -> " |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Apache-HBase
commented
Dec 10, 2024
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Dec 10, 2024
💔 -1 overall
This message was automatically generated. |
…6422) Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
…6422) Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
ndimiduk
commented
Dec 10, 2024
I think that this change is benign enough for our active release lines. @apurtell do you have any objection to adding this to branch-2.5? |
…6422) Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
…6529) Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> Co-authored-by: JinHyuk Kim <tk5641@naver.com>
…6422) Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
apache#6422)" to branch-2 (apache#6544) Signed-off-by: Andrew Purtell <apurtell@apache.org>
apache#6422)" to branch-2.5 (apache#6592) Signed-off-by: Andrew Purtell <apurtell@apache.org>
Introduce a new configuration,
hfile.block.cache.memory.size, which allows setting the block cache size with an exact byte value or a human-readable storage size.