Skip to content

HBASE-28463 Time Based Priority for BucketCache - #7192

Merged
wchevreuil merged 8 commits into
masterfrom
HBASE-28463
Sep 1, 2025
Merged

HBASE-28463 Time Based Priority for BucketCache#7192
wchevreuil merged 8 commits into
masterfrom
HBASE-28463

Conversation

@wchevreuil

Copy link
Copy Markdown
Contributor

No description provided.

vinayakphegdeand others added 7 commits August 5, 2025 15:19
…t-cache (#5793)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
…or Time Range Data Tiering (#5809)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
…in prefetch functionality of HBase (#5808)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
…5829)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
…on paths (#5866)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
Reviewed-by: Janardhan Hugund <janardhan.hungund@cloudera.com>
…ode paths. (#5905)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@taklwutaklwu left a comment

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.

few questions below and inlines, otherwise LGTM

  1. according from #5829, there is a file TestPrefetch.java in the diff, where did we remove it from this PR?

BlockType.BlockCategory category = hfileBlock.getBlockType().getCategory();
final boolean cacheCompressed = cacheConf.shouldCacheCompressed(category);
final boolean cacheOnRead = cacheConf.shouldCacheBlockOnRead(category);
final boolean cacheOnRead =

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.

this part is different from #5905 , where cacheOnRead has been defined but it does not use in line#1391 and line#1405, is it expected?

in other words, is these two APIs of cacheConf.shouldCacheBlockOnRead(category) and cacheConf.shouldCacheBlockOnRead(category, getHFileInfo(), conf) the same?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

this part is different from #5905 , where cacheOnRead has been defined but it does not use in line#1391 and line#1405, is it expected?

Sorry, ain't following you. This seems same code we added in PR 5905, line #1351 of HFileReaderImpl.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

in other words, is these two APIs of cacheConf.shouldCacheBlockOnRead(category) and cacheConf.shouldCacheBlockOnRead(category, getHFileInfo(), conf) the same?

Those are not the same. The former just checks for the block type, whilst the latter performs additional checks to figure if the data block is already cached, in order to avoid redundant caching from file system.

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.

yeah, sorry I didn't explain my comment with links,

about the cacheOnRead , in the old PR #5905 , cacheOnRead has been used within the if block if (cacheOnly && cacheCompressed && cacheOnRead) {https://github.com/apache/hbase/pull/5905/files#diff-c910a49e7d962e49b199d22f38e1cd78d867351208b86bffdd56ffb9aa1aa596R1358 , but in this PR, we don't see those usage of cacheOnRead, did I miss anything?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Ok, I think I got it now. This is probably due to the rebase on top of master branch. Master branch had this HBASE-28596, which was missing on the feature branch when PR #5905 was merged. So when resolving this conflict in the rebase, I simply picked the master version.

Reading this now, seems wrong to me, we should do as PR #595 was doing. I'm going to update it.

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.

thanks for fixing it. LGTM now

Comment on lines +271 to +274
// Since HBASE-28466, we call fileInfo.initMetaAndIndex inside HFilePreadReader,
// which reads some blocks and increment the counters, so we need to reset it here.
ThreadLocalServerSideScanMetrics.getBytesReadFromFsAndReset();
ThreadLocalServerSideScanMetrics.getBlockReadOpsCountAndReset();

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.

it's not part of #7124 , can you point out where does this come from ? new changes to fix tests when HBASE-28466 is included?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Yeah, these are changes introduced in this PR last commit to fix the tests for HBASE-28466 changes.

@wchevreuil

wchevreuil commented Aug 26, 2025

Copy link
Copy Markdown
ContributorAuthor

few questions below and inlines, otherwise LGTM

  1. according from HBASE-28468: Integrate the data-tiering logic into cache evictions. #5829, there is a file TestPrefetch.java in the diff, where did we remove it from this PR?

That change from #5829 was removed when resolving conflicts from HBASE-28804. The code introduced on HBASE-28804 makes change from #5829 irrelevant.

…ure branch (#7124)
This is the whole custom tiering implementation and involves the following individual works:
* HBASE-29412 Extend date tiered compaction to allow for tiering by values other than cell timestamp
* HBASE-29413 Implement a custom qualifier tiered compaction
* HBASE-29414 Refactor DataTieringManager to make priority logic pluggable
* HBASE-29422 Implement selectMinorCompation in CustomCellDateTieredCompactionPolicy
* HBASE-29424 Implement configuration validation for custom tiering compactions
* HBASE-29425 Refine and polish code
* HBASE-29426 Define a tiering value provider and refactor custom tiered compaction related classes
* HBASE-28463 Rebase time based priority branch (HBASE-28463) with latest master (and fix conflicts)
Co-authored-by: Janardhan Hungund <janardhan.hungund@cloudera.com>
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 32sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
_ master Compile Tests _
+0 🆗mvndep0m 38sMaven dependency ordering for branch
+1 💚mvninstall3m 36smaster passed
+1 💚compile4m 6smaster passed
+1 💚checkstyle0m 55smaster passed
+1 💚spotbugs2m 19smaster passed
+1 💚spotless0m 52sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for patch
+1 💚mvninstall3m 5sthe patch passed
+1 💚compile4m 3sthe patch passed
+1 💚javac4m 3sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
-0 ⚠️checkstyle0m 40s/results-checkstyle-hbase-server.txthbase-server: The patch generated 16 new + 30 unchanged - 0 fixed = 46 total (was 30)
+1 💚spotbugs2m 30sthe patch passed
+1 💚hadoopcheck11m 48sPatch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚spotless0m 48spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 20sThe patch does not generate ASF License warnings.
44m 30s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7192/4/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#7192
Optional Testsdupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
unameLinux 9f3ff94c352c 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 6fdffaf
Default JavaEclipse Adoptium-17.0.11+9
Max. process+thread count85 (vs. ulimit of 30000)
modulesC: hbase-common hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7192/4/console
versionsgit=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 29sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 10sMaven dependency ordering for branch
+1 💚mvninstall3m 19smaster passed
+1 💚compile1m 17smaster passed
+1 💚javadoc0m 45smaster passed
+1 💚shadedjars6m 9sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for patch
+1 💚mvninstall3m 7sthe patch passed
+1 💚compile1m 17sthe patch passed
+1 💚javac1m 17sthe patch passed
+1 💚javadoc0m 42sthe patch passed
+1 💚shadedjars6m 6spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚unit2m 15shbase-common in the patch passed.
+1 💚unit234m 39shbase-server in the patch passed.
265m 51s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7192/4/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#7192
Optional Testsjavac javadoc unit compile shadedjars
unameLinux 6892ebfbdca4 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 6fdffaf
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7192/4/testReport/
Max. process+thread count4450 (vs. ulimit of 30000)
modulesC: hbase-common hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7192/4/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@wchevreuil

Copy link
Copy Markdown
ContributorAuthor

Any further comments, @taklwu ?

@wchevreuil
wchevreuil requested a review from taklwuAugust 28, 2025 19:23
@wchevreuil
wchevreuil merged commit fb5f919 into masterSep 1, 2025
1 check passed
Sign up for freeto 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.

5 participants

@wchevreuil@Apache-HBase@taklwu@vinayakphegde@jhungund