Skip to content

HBASE-28716: Users of QuotaRetriever should pass an existing connection (branch-2) - #6054

Closed
charlesconnell wants to merge 2 commits into
apache:branch-2from
HubSpot:quota-retriver-reuse-connection-2
Closed

HBASE-28716: Users of QuotaRetriever should pass an existing connection (branch-2)#6054
charlesconnell wants to merge 2 commits into
apache:branch-2from
HubSpot:quota-retriver-reuse-connection-2

Conversation

@charlesconnell

@charlesconnellcharlesconnell commented Jul 8, 2024

Copy link
Copy Markdown
Contributor

Every call to HBaseAdmin#getQuota() opens a new Connection, and then closes it. As far as I can tell, this is pointless, since it could use the existing Connection object held by the HBaseAdmin. Change this and other uses of QuotaRetriever to use existing Connections.

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

@charlesconnell

Copy link
Copy Markdown
ContributorAuthor

The build check failure appears unrelated to my change

pankaj72981
pankaj72981 previously approved these changes Jul 9, 2024
List<QuotaSettings> quotas = new ArrayList<>();
try (QuotaRetriever retriever = QuotaRetriever.open(conf, filter)) {
try (QuotaRetriever retriever = QuotaRetriever.open(connection, filter)) {
Iterator<QuotaSettings> iterator = retriever.iterator();

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.

Changes looks good to me.

However similar optimization can be done in master branch as well, below API is used multiple places
org.apache.hadoop.hbase.quotas.QuotaRetriever#open(org.apache.hadoop.conf.Configuration, org.apache.hadoop.hbase.quotas.QuotaFilter)

We can reuse the existing connection instead of creating new one always.

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.

Okay, I'm happy to expand the scope of this ticket.

@charlesconnellcharlesconnell changed the title HBASE-28716: HBaseAdmin should pass QuotaRetriever an existing connectionHBASE-28716: Users of QuotaRetriever should pass an existing connectionJul 9, 2024
@charlesconnellcharlesconnell changed the title HBASE-28716: Users of QuotaRetriever should pass an existing connectionHBASE-28716: Users of QuotaRetriever should pass an existing connection (branch-2)Jul 9, 2024
@pankaj72981
pankaj72981 self-requested a review July 9, 2024 17:26
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 44sDocker 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.
_ branch-2 Compile Tests _
+0 🆗mvndep0m 21sMaven dependency ordering for branch
+1 💚mvninstall3m 4sbranch-2 passed
+1 💚compile3m 41sbranch-2 passed
+1 💚checkstyle0m 53sbranch-2 passed
+1 💚spotbugs2m 21sbranch-2 passed
+1 💚spotless0m 46sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for patch
+1 💚mvninstall3m 3sthe patch passed
+1 💚compile3m 41sthe patch passed
+1 💚javac3m 41sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 52sthe patch passed
+1 💚spotbugs2m 42sthe patch passed
-1 ❌hadoopcheck11m 10sThe patch causes 10 errors with Hadoop v3.4.0.
+1 💚spotless0m 46spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 18sThe patch does not generate ASF License warnings.
36m 33s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6054/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#6054
JIRA IssueHBASE-28716
Optional Testsdupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
unameLinux 320b41e37fc6 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 revisionbranch-2 / 29a462e
Default JavaEclipse Adoptium-11.0.23+9
hadoopcheckhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6054/2/artifact/yetus-general-check/output/patch-javac-3.4.0.txt
Max. process+thread count79 (vs. ulimit of 30000)
modulesC: hbase-client hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6054/2/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 54sDocker mode activated.
-0 ⚠️yetus0m 5sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for branch
+1 💚mvninstall2m 36sbranch-2 passed
+1 💚compile0m 59sbranch-2 passed
+1 💚javadoc0m 40sbranch-2 passed
+1 💚shadedjars5m 23sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for patch
+1 💚mvninstall2m 46sthe patch passed
+1 💚compile1m 16sthe patch passed
+1 💚javac1m 16sthe patch passed
+1 💚javadoc0m 55sthe patch passed
+1 💚shadedjars6m 6spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚unit7m 41shbase-client in the patch passed.
+1 💚unit240m 24shbase-server in the patch passed.
275m 30s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6054/2/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR#6054
JIRA IssueHBASE-28716
Optional Testsjavac javadoc unit compile shadedjars
unameLinux 4613df4e581b 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 revisionbranch-2 / 29a462e
Default JavaTemurin-1.8.0_412-b08
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6054/2/testReport/
Max. process+thread count3938 (vs. ulimit of 30000)
modulesC: hbase-client hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6054/2/console
versionsgit=2.34.1 maven=3.9.8
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 42sDocker mode activated.
-0 ⚠️yetus0m 5sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for branch
+1 💚mvninstall2m 58sbranch-2 passed
+1 💚compile1m 19sbranch-2 passed
+1 💚javadoc0m 49sbranch-2 passed
+1 💚shadedjars5m 27sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for patch
+1 💚mvninstall3m 49sthe patch passed
+1 💚compile1m 42sthe patch passed
+1 💚javac1m 42sthe patch passed
+1 💚javadoc0m 57sthe patch passed
+1 💚shadedjars6m 42spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚unit8m 42shbase-client in the patch passed.
-1 ❌unit239m 6s/patch-unit-hbase-server.txthbase-server in the patch failed.
277m 35s
SubsystemReport/Notes
DockerClientAPI=1.46 ServerAPI=1.46 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6054/2/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#6054
JIRA IssueHBASE-28716
Optional Testsjavac javadoc unit compile shadedjars
unameLinux 5834d33aa3ea 5.4.0-186-generic #206-Ubuntu SMP Fri Apr 26 12:31:10 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2 / 29a462e
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6054/2/testReport/
Max. process+thread count4365 (vs. ulimit of 30000)
modulesC: hbase-client hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6054/2/console
versionsgit=2.34.1 maven=3.9.8
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 50sDocker mode activated.
-0 ⚠️yetus0m 5sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+0 🆗mvndep0m 21sMaven dependency ordering for branch
+1 💚mvninstall4m 24sbranch-2 passed
+1 💚compile1m 58sbranch-2 passed
+1 💚javadoc1m 0sbranch-2 passed
+1 💚shadedjars8m 11sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 17sMaven dependency ordering for patch
+1 💚mvninstall3m 52sthe patch passed
+1 💚compile1m 49sthe patch passed
+1 💚javac1m 49sthe patch passed
+1 💚javadoc0m 56sthe patch passed
+1 💚shadedjars5m 41spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚unit8m 22shbase-client in the patch passed.
+1 💚unit237m 36shbase-server in the patch passed.
280m 27s
SubsystemReport/Notes
DockerClientAPI=1.46 ServerAPI=1.46 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6054/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#6054
JIRA IssueHBASE-28716
Optional Testsjavac javadoc unit compile shadedjars
unameLinux 1c53ce2d32fd 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2 / 29a462e
Default JavaEclipse Adoptium-11.0.23+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6054/2/testReport/
Max. process+thread count4536 (vs. ulimit of 30000)
modulesC: hbase-client hbase-server U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6054/2/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@charlesconnell

Copy link
Copy Markdown
ContributorAuthor

unit test failure appears unrelated

@ndimidukndimiduk added the backport This PR is a back port of some issue or issues already committed to master label Jul 17, 2024
@ndimiduk

Copy link
Copy Markdown
Member

Heya -- let's keep the initial design discussion on the PR vs. master and leave this for the backport.

@pankaj72981
pankaj72981 dismissed their stale reviewJuly 17, 2024 19:29

JIRA scope is expanded.

@charlesconnell
charlesconnell deleted the quota-retriver-reuse-connection-2 branch July 22, 2024 14:58
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backportThis PR is a back port of some issue or issues already committed to master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@charlesconnell@Apache-HBase@ndimiduk@pankaj72981