Skip to content

Conversation

@rmdmattingly
Copy link
Contributor

@rmdmattingly rmdmattingly commented Mar 19, 2025

I deployed this to a QA cluster at my company and enabled:

  1. System table isolation (balancer conditional)
  2. Replica distribution (balancer conditional)
  3. and primarily balanced based on StoreFileSizeTableSkew and StoreFileSizeCost

We ended up with multiple tables, balanced virtually perfectly in every regard (the empty column is the host assigned to serving system tables):
Screenshot 2025-03-19 at 5 41 10 PM

I'm still thinking about how to unit test this. It is implicitly tested by our existing test suite since it has a default cost >0, but there is not much precedent for testing these cost functions individually and it would be non-trivial to meaningfully test it in isolation

@rmdmattingly rmdmattingly requested a review from ndimiduk March 19, 2025 21:49
@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.

@rmdmattingly rmdmattingly force-pushed the HBASE-29203 branch 2 times, most recently from ff7414c to f138bbb Compare March 20, 2025 19:53
@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.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 29s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed 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 _
+1 💚 mvninstall 3m 3s master passed
+1 💚 compile 0m 15s master passed
+1 💚 javadoc 0m 12s master passed
+1 💚 shadedjars 5m 55s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 3m 6s the patch passed
+1 💚 compile 0m 15s the patch passed
+1 💚 javac 0m 15s the patch passed
+1 💚 javadoc 0m 11s the patch passed
+1 💚 shadedjars 6m 0s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 8m 21s hbase-balancer in the patch passed.
28m 41s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6825/7/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #6825
Optional Tests javac javadoc unit compile shadedjars
uname Linux 4049bf6d1d47 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 3339597
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6825/7/testReport/
Max. process+thread count 270 (vs. ulimit of 30000)
modules C: hbase-balancer U: hbase-balancer
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6825/7/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 45s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
_ master Compile Tests _
+1 💚 mvninstall 3m 54s master passed
+1 💚 compile 0m 33s master passed
+1 💚 checkstyle 0m 13s master passed
+1 💚 spotbugs 0m 33s master passed
+1 💚 spotless 0m 53s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚 mvninstall 3m 44s the patch passed
+1 💚 compile 0m 27s the patch passed
+1 💚 javac 0m 27s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 9s the patch passed
+1 💚 spotbugs 0m 37s the patch passed
+1 💚 hadoopcheck 13m 45s Patch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚 spotless 0m 52s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 11s The patch does not generate ASF License warnings.
34m 44s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6825/7/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #6825
Optional Tests dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
uname Linux c6b1efeeb248 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 3339597
Default Java Eclipse Adoptium-17.0.11+9
Max. process+thread count 83 (vs. ulimit of 30000)
modules C: hbase-balancer U: hbase-balancer
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6825/7/console
versions git=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Member

@ndimiduk ndimiduk left a comment

Choose a reason for hiding this comment

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

Your pictures are too pretty to pass up. Let's learn what we can about how it performs at scale.

double regionCost = 0;
if (loads != null && !loads.isEmpty()) {
// Average the storefile sizes if there are multiple measurements.
for (BalancerRegionLoad rl : loads) {
Copy link
Member

Choose a reason for hiding this comment

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

Is this going to be too expensive for a cluster with 1000 servers and 100,000 regions?

This may be a legitimate use-case for re-implementing as a Stream with parallel processing enabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Luckily prepare isn't called too often, so hopefully it won't be too bad

@rmdmattingly rmdmattingly merged commit 089ff48 into apache:master Mar 21, 2025
1 check passed
@rmdmattingly rmdmattingly deleted the HBASE-29203 branch March 21, 2025 12:10
rmdmattingly added a commit that referenced this pull request Mar 21, 2025
…ewCost (#6825)

Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
rmdmattingly added a commit that referenced this pull request Mar 21, 2025
…ewCost (#6825)

Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
rmdmattingly added a commit to HubSpot/hbase that referenced this pull request Mar 21, 2025
…ewCost (apache#6825)

Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
rmdmattingly added a commit to HubSpot/hbase that referenced this pull request Mar 21, 2025
…ent to the TableSkewCost (apache#6825) (will be in 2.7)

Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
rmdmattingly added a commit to HubSpot/hbase that referenced this pull request Mar 21, 2025
…ent to the TableSkewCost (apache#6825) (will be in 2.7)

Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
rmdmattingly added a commit to HubSpot/hbase that referenced this pull request Mar 21, 2025
…ewCost (apache#6825)

Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
rmdmattingly added a commit that referenced this pull request Mar 21, 2025
…ewCost (#6825) (#6838)

Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
rmdmattingly added a commit that referenced this pull request Mar 21, 2025
…ewCost (#6825)

Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
rmdmattingly added a commit that referenced this pull request Mar 23, 2025
…ewCost (#6825) (#6839)

Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
charlesconnell pushed a commit to HubSpot/hbase that referenced this pull request Jun 25, 2025
…ent to the TableSkewCost (apache#6825) (will be in 2.7)

Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
charlesconnell pushed a commit to HubSpot/hbase that referenced this pull request Jul 1, 2025
…ent to the TableSkewCost (apache#6825) (will be in 2.7)

Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
mokai87 pushed a commit to mokai87/hbase that referenced this pull request Aug 7, 2025
…ewCost (apache#6825) (apache#6839)

Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
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.

3 participants