Skip to content

HBASE-30102 Add metric to account for region data classified as cold by the Time Based Priority logic#8128

Open
wchevreuil wants to merge 3 commits intoapache:masterfrom
wchevreuil:HBASE-30102
Open

HBASE-30102 Add metric to account for region data classified as cold by the Time Based Priority logic#8128
wchevreuil wants to merge 3 commits intoapache:masterfrom
wchevreuil:HBASE-30102

Conversation

@wchevreuil
Copy link
Copy Markdown
Contributor

No description provided.

…by the Time Based Priority logic

Change-Id: I5601a37300a3f5d10fe4886ba988f2d25e66b546
Change-Id: I8eb236beaf7976ccd02349aa81277ca84925e7e6
Copy link
Copy Markdown
Contributor

@taklwu taklwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when Time Based Priority is disabled, what would be the % Cold Data? is it always showing?

getAllCacheKeysForFile(hFileInfo.getHFileContext().getHFileName(), 0, Long.MAX_VALUE);
int evictedBlocks = evictBlockSet(keySet);
if (evictedBlocks > 0) {
LOG.info("Evicted {} blocks for file {} as it is now considered cold by DataTieringManager",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should we have it as debug level? I'm wondered if we see a lot of these message.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, yeah. Although it would be triggered only upon enabling of the time based priority on the individual store, and once for each affected file, it can still flood the logs. Let me switch it to DEBUG.

Comment on lines +106 to +111
if (key.getCfName() != null) {
builder.setFamilyName(key.getCfName());
}
if (key.getRegionName() != null) {
builder.setRegionName(key.getRegionName());
}
Copy link
Copy Markdown
Contributor

@taklwu taklwu Apr 27, 2026

Choose a reason for hiding this comment

The 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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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.

Change-Id: I392517f882e7c5a8c6063b16f525f6467956a3bb
@wchevreuil wchevreuil requested a review from taklwu April 28, 2026 15:45
Copy link
Copy Markdown
Contributor

@taklwu taklwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

something is wrong with the github action, can you give a try to trigger them ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants