Skip to content
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

HBASE-27800: Add support for default user quotas #5666

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

rmdmattingly
Copy link
Contributor

@rmdmattingly rmdmattingly commented Feb 6, 2024

If you're managing HBase for many users, then managing effective user quotas can be a difficult operational burden. At my day job we have thousands of web services, workers, and recurring jobs — each of which we consider a distinct user via request attributes and quota user overrides. A common reliability issue is that some single system runs awry, for whatever reason, and generates a pathologic amount of traffic at the HBase level; this can cause pain for any other systems dependent on the given HBase cluster.

The above situation could potentially be solved by maintaining our own automated user quota management, but even better would be the ability to specify default user quotas at the HBase level. So that's exactly what this PR introduces.

In this PR we add six new configuration options to the QuotaUtil class:

  /*
   * The below defaults, if configured, will be applied to otherwise unthrottled users. For example,
   * set `hbase.quota.default.user.machine.read.size` to `1048576` in your hbase-site.xml to ensure
   * that any given user may not query more than 1mb per second from any given machine, unless
   * explicitly permitted by a persisted quota. All of these defaults use TimeUnit.SECONDS and
   * QuotaScope.MACHINE.
   */
  public static final String QUOTA_DEFAULT_USER_MACHINE_READ_NUM =
    "hbase.quota.default.user.machine.read.num";
  public static final String QUOTA_DEFAULT_USER_MACHINE_READ_SIZE =
    "hbase.quota.default.user.machine.read.size";
  public static final String QUOTA_DEFAULT_USER_MACHINE_REQUEST_NUM =
    "hbase.quota.default.user.machine.request.num";
  public static final String QUOTA_DEFAULT_USER_MACHINE_REQUEST_SIZE =
    "hbase.quota.default.user.machine.request.size";
  public static final String QUOTA_DEFAULT_USER_MACHINE_WRITE_NUM =
    "hbase.quota.default.user.machine.write.num";
  public static final String QUOTA_DEFAULT_USER_MACHINE_WRITE_SIZE =
    "hbase.quota.default.user.machine.write.size";

These options are exactly what they sound like — one could configure hbase.quota.default.user.machine.read.size and hbase.quota.default.user.machine.req.num to ensure that no users can exceed a given read size and request per-machine throughput (unless explicitly given larger allowance via a defined quota).

cc @bbeaudreault @hgromer @eab148 @bozzkar

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 42s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+1 💚 mvninstall 3m 2s master passed
+1 💚 compile 2m 30s master passed
+1 💚 checkstyle 0m 38s master passed
+1 💚 spotless 0m 47s branch has no errors when running spotless:check.
+1 💚 spotbugs 1m 33s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 44s the patch passed
+1 💚 compile 2m 26s the patch passed
+1 💚 javac 2m 26s the patch passed
+1 💚 checkstyle 0m 36s hbase-server: The patch generated 0 new + 2 unchanged - 1 fixed = 2 total (was 3)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 4m 44s Patch does not cause any errors with Hadoop 3.3.6.
+1 💚 spotless 0m 42s patch has no errors when running spotless:check.
+1 💚 spotbugs 1m 37s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 12s The patch does not generate ASF License warnings.
28m 18s
Subsystem Report/Notes
Docker ClientAPI=1.44 ServerAPI=1.44 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #5666
JIRA Issue HBASE-27800
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
uname Linux 6fdfddf6256b 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / afbf2ad
Default Java Eclipse Adoptium-11.0.17+8
Max. process+thread count 80 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/1/console
versions git=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 2m 9s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 3m 11s master passed
+1 💚 compile 0m 46s master passed
+1 💚 shadedjars 5m 47s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 24s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 58s the patch passed
+1 💚 compile 0m 45s the patch passed
+1 💚 javac 0m 45s the patch passed
+1 💚 shadedjars 5m 41s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 23s the patch passed
_ Other Tests _
+1 💚 unit 220m 24s hbase-server in the patch passed.
246m 29s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #5666
JIRA Issue HBASE-27800
Optional Tests javac javadoc unit shadedjars compile
uname Linux 074c5b6f6f7f 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 / afbf2ad
Default Java Eclipse Adoptium-11.0.17+8
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/1/testReport/
Max. process+thread count 4667 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/1/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 2m 11s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 2m 41s master passed
+1 💚 compile 0m 38s master passed
+1 💚 shadedjars 5m 32s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 23s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 26s the patch passed
+1 💚 compile 0m 38s the patch passed
+1 💚 javac 0m 38s the patch passed
+1 💚 shadedjars 5m 31s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 22s the patch passed
_ Other Tests _
+1 💚 unit 226m 44s hbase-server in the patch passed.
251m 39s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #5666
JIRA Issue HBASE-27800
Optional Tests javac javadoc unit shadedjars compile
uname Linux 99e71ce97c8d 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 / afbf2ad
Default Java Temurin-1.8.0_352-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/1/testReport/
Max. process+thread count 4803 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/1/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 40s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+1 💚 mvninstall 2m 46s master passed
+1 💚 compile 2m 28s master passed
+1 💚 checkstyle 0m 36s master passed
+1 💚 spotless 0m 41s branch has no errors when running spotless:check.
+1 💚 spotbugs 1m 28s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 47s the patch passed
+1 💚 compile 2m 26s the patch passed
+1 💚 javac 2m 26s the patch passed
+1 💚 checkstyle 0m 36s hbase-server: The patch generated 0 new + 2 unchanged - 1 fixed = 2 total (was 3)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 4m 48s Patch does not cause any errors with Hadoop 3.3.6.
+1 💚 spotless 0m 42s patch has no errors when running spotless:check.
+1 💚 spotbugs 1m 39s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 10s The patch does not generate ASF License warnings.
27m 50s
Subsystem Report/Notes
Docker ClientAPI=1.44 ServerAPI=1.44 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #5666
JIRA Issue HBASE-27800
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
uname Linux d48a820d6911 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / afbf2ad
Default Java Eclipse Adoptium-11.0.17+8
Max. process+thread count 78 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/2/console
versions git=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 27s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 2m 56s master passed
+1 💚 compile 0m 46s master passed
+1 💚 shadedjars 5m 44s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 23s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 50s the patch passed
+1 💚 compile 0m 45s the patch passed
+1 💚 javac 0m 45s the patch passed
+1 💚 shadedjars 5m 45s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 23s the patch passed
_ Other Tests _
-1 ❌ unit 222m 59s hbase-server in the patch failed.
246m 52s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #5666
JIRA Issue HBASE-27800
Optional Tests javac javadoc unit shadedjars compile
uname Linux f8a2975dddb0 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 / afbf2ad
Default Java Eclipse Adoptium-11.0.17+8
unit https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/2/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/2/testReport/
Max. process+thread count 5528 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/2/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 26s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 2m 45s master passed
+1 💚 compile 0m 38s master passed
+1 💚 shadedjars 5m 28s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 23s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 22s the patch passed
+1 💚 compile 0m 39s the patch passed
+1 💚 javac 0m 39s the patch passed
+1 💚 shadedjars 5m 27s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 21s the patch passed
_ Other Tests _
+1 💚 unit 225m 45s hbase-server in the patch passed.
248m 9s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #5666
JIRA Issue HBASE-27800
Optional Tests javac javadoc unit shadedjars compile
uname Linux 20d373a14779 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 / afbf2ad
Default Java Temurin-1.8.0_352-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/2/testReport/
Max. process+thread count 5710 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5666/2/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@rmdmattingly
Copy link
Contributor Author

The TestAcidGuaranteesWithBasicPolicy failure appears unrelated

@bbeaudreault bbeaudreault merged commit 275d928 into apache:master Feb 7, 2024
1 check failed
@bbeaudreault bbeaudreault deleted the HBASE-27800 branch February 7, 2024 14:23
bbeaudreault pushed a commit that referenced this pull request Feb 7, 2024
Signed-off-by: Bryan Beaudreault <bbeaudreault@apache.org>
bbeaudreault pushed a commit that referenced this pull request Feb 7, 2024
Signed-off-by: Bryan Beaudreault <bbeaudreault@apache.org>
bbeaudreault pushed a commit that referenced this pull request Feb 7, 2024
Signed-off-by: Bryan Beaudreault <bbeaudreault@apache.org>
bbeaudreault pushed a commit to HubSpot/hbase that referenced this pull request Feb 7, 2024
…pache#5666)

Signed-off-by: Bryan Beaudreault <bbeaudreault@apache.org>
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