-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-30102 Add metric to account for region data classified as cold by the Time Based Priority logic #8128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
06b6ab8
3b4bd11
14fb76d
91ac5d5
19456d3
1e5e23b
860d2a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,9 +100,16 @@ private static void addEntryToBuilder(Map.Entry<BlockCacheKey, BucketEntry> entr | |
| } | ||
|
|
||
| private static BucketCacheProtos.BlockCacheKey toPB(BlockCacheKey key) { | ||
| return BucketCacheProtos.BlockCacheKey.newBuilder().setHfilename(key.getHfileName()) | ||
| .setOffset(key.getOffset()).setPrimaryReplicaBlock(key.isPrimary()) | ||
| .setBlockType(toPB(key.getBlockType())).build(); | ||
| BucketCacheProtos.BlockCacheKey.Builder builder = BucketCacheProtos.BlockCacheKey.newBuilder() | ||
| .setHfilename(key.getHfileName()).setOffset(key.getOffset()) | ||
| .setPrimaryReplicaBlock(key.isPrimary()).setBlockType(toPB(key.getBlockType())); | ||
| if (key.getCfName() != null) { | ||
| builder.setFamilyName(key.getCfName()); | ||
| } | ||
| if (key.getRegionName() != null) { | ||
| builder.setRegionName(key.getRegionName()); | ||
| } | ||
|
Comment on lines
+106
to
+111
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: why weren't the cf and regionname filled before ? is it because the cold data needs for log message or other compute usage?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. This is required not only by the new "coldDataRatio" metric we are adding, but also the existing "regionCachedRatio" that is critical for the CacheAwareLoadBalancer. Without this change here, we cannot calculate these metrics when recovering the persistent cache. IMO, it's a bug in the current CacheAwareLoadBalancer implementation. |
||
| return builder.build(); | ||
| } | ||
|
|
||
| private static BucketCacheProtos.BlockType toPB(BlockType blockType) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method name
shouldCacheFilesuggests this just a check but it actually evicts the blocks.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, not ideal, but I still think it should be BucketCache responsibility to evict blocks from files that became classified as cold, upon changing time based priority configuration. Moving this to DataTieringManager would tighter couple it with BucketCache.