Skip to content

HBASE-25896 Implement a Region Visualization on Master WebUI - #4178

Merged
ndimiduk merged 1 commit into
apache:masterfrom
ndimiduk:25865-region-visualizer
Mar 15, 2022
Merged

HBASE-25896 Implement a Region Visualization on Master WebUI#4178
ndimiduk merged 1 commit into
apache:masterfrom
ndimiduk:25865-region-visualizer

Conversation

@ndimiduk

Copy link
Copy Markdown
Member

This is a demonstration of visualization of regions on the cluster. The visualization is a stacked
bar chart showing total storefile size per table per region server, with the x-axis being server
names, the y-axis being storfile size, and the bars stacked per table. The visualization is
generated entirely on the fly from within the browser, implemented using Vega Lite. So far, Vega
appears to handle rendering this visualization for a cluster of over 700 region servers with
approximately 300,000 regions.

Per 0, include an update to the top-level LICENSE.txt. Also update LICENSE files in all binary
distributions (i.e., jars), by way of LICENSE.vm. Vega uses a BSD 3-clause variant without
advertising clause, and as such is a "Category A" license, per 1.

No changes are made to the NOTICE files, as per the existing example of bundling the minified
JQuery, which is also a Category A license.

@ndimiduk

Copy link
Copy Markdown
MemberAuthor

This PR is on top of #4177

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

See comments/questions

Much of this change looks like boilerplate to wire up Gson to Jersey. It seems sane. I do not claim to understand the requirements there in detail.

import org.apache.hbase.thirdparty.javax.ws.rs.ext.MessageBodyWriter;

/**
* Implements JSON serialization via {@link Gson} for JAX-RS.

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.

Just for my understanding, the ready alternative is JSON serialization via Jackson. (No claim that it is desirable or not.)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Yes, I suppose we still have Jackson around. I thought we were making an effort to purge it from our codebase, with Gson being the replacement target. I could be incorrect in that understanding! I am happy to use whichever is the community target. It is quite confusing to have multiple libraries on hand for marshaling JSON.

@Override
protected void configureInfoServer(InfoServer infoServer) {
infoServer.addUnprivilegedServlet("master-status", "/master-status", MasterStatusServlet.class);
infoServer.addUnprivilegedServlet("api_v1", "/api/v1/*", buildApiV1Servlet());

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 is nice, something to build on

.register(GsonSerializationFeature.class)
.register(new MasterFeature(master))

// devs: enable TRACING to see how jersey is dispatching to resources.

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 could be lifted out to a note in the book.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I don't expect users to make use of Jersey tracing for this API as I don't expect users to consume this API directly. Hence keeping the information here in the code.

For clarity, this isn't OpenTelemetry tracing, this is tracing of the Jersey internals, how it receives and dispatches the request to an appropriate Resource instance.

@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@ndimiduk
ndimidukforce-pushed the 25865-region-visualizer branch 2 times, most recently from fb8d724 to 63a849cCompareMarch 10, 2022 14:33
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 37sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗jshint0m 0sjshint was not available.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗mvndep0m 53sMaven dependency ordering for branch
+1 💚mvninstall4m 17smaster passed
+1 💚compile9m 59smaster passed
+1 💚checkstyle2m 4smaster passed
-1 ❌spotbugs1m 57shbase-server in master has 1 extant spotbugs warnings.
-1 ❌spotbugs12m 34sroot in master has 1 extant spotbugs warnings.
_ Patch Compile Tests _
+0 🆗mvndep0m 15sMaven dependency ordering for patch
+1 💚mvninstall3m 22sthe patch passed
+1 💚compile12m 5sthe patch passed
-0 ⚠️javac12m 5sroot generated 1 new + 1468 unchanged - 1 fixed = 1469 total (was 1469)
-0 ⚠️checkstyle1m 44sroot: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
-0 ⚠️whitespace0m 0sThe patch 2 line(s) with tabs.
+1 💚xml0m 7sThe patch has no ill-formed XML file.
+1 💚hadoopcheck15m 45sPatch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.
+1 💚spotbugs15m 16sthe patch passed
_ Other Tests _
+1 💚asflicense1m 11sThe patch does not generate ASF License warnings.
91m 14s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#4178
Optional Testsdupname asflicense javac hadoopcheck xml compile spotbugs hbaseanti checkstyle jshint
unameLinux 07e69e2d881f 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / be0afbf
Default JavaAdoptOpenJDK-1.8.0_282-b08
spotbugshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/artifact/yetus-general-check/output/branch-spotbugs-hbase-server-warnings.html
spotbugshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/artifact/yetus-general-check/output/branch-spotbugs-root-warnings.html
javachttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/artifact/yetus-general-check/output/diff-compile-javac-root.txt
checkstylehttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/artifact/yetus-general-check/output/diff-checkstyle-root.txt
whitespacehttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/artifact/yetus-general-check/output/whitespace-tabs.txt
Max. process+thread count87 (vs. ulimit of 30000)
modulesC: hbase-resource-bundle hbase-http hbase-server hbase-shaded hbase-assembly . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/console
versionsgit=2.17.1 maven=3.6.3 spotbugs=4.2.2
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 14sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 38sMaven dependency ordering for branch
+1 💚mvninstall4m 50smaster passed
+1 💚compile3m 33smaster passed
+1 💚shadedjars6m 1sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc4m 41smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 23sMaven dependency ordering for patch
+1 💚mvninstall4m 53sthe patch passed
+1 💚compile3m 46sthe patch passed
+1 💚javac3m 46sthe patch passed
+1 💚shadedjars6m 6spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc5m 7sthe patch passed
_ Other Tests _
-1 ❌unit377m 39sroot in the patch failed.
423m 16s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#4178
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 3c35072854b1 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / be0afbf
Default JavaAdoptOpenJDK-11.0.10+9
unithttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-root.txt
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/testReport/
Max. process+thread count2508 (vs. ulimit of 30000)
modulesC: hbase-resource-bundle hbase-http hbase-server hbase-shaded hbase-assembly . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ndimiduk
ndimiduk marked this pull request as ready for review March 11, 2022 14:49
@ndimiduk
ndimidukforce-pushed the 25865-region-visualizer branch from 63a849c to 91f8a2dCompareMarch 14, 2022 16:52
@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 0sDocker mode activated.
-1 ❌docker0m 0sDocker command '/usr/bin/docker' is too old (1.41 < API v 1.27.0).
SubsystemReport/Notes
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/console
versionsgit=2.17.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 7sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --quick-hadoopcheck --exclude-tests-url --asf-nightlies-general-check-base --build-thread --surefire-first-part-fork-count --surefire-second-part-fork-count
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗jshint0m 0sjshint was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗mvndep0m 24sMaven dependency ordering for branch
+1 💚mvninstall6m 3smaster passed
+1 💚compile6m 14smaster passed
+1 💚checkstyle3m 3smaster passed
+0 🆗spotbugs0m 27sbranch/hbase-assembly no spotbugs output file (spotbugsXml.xml)
+0 🆗spotbugs0m 12sbranch/hbase-resource-bundle no spotbugs output file (spotbugsXml.xml)
+0 🆗spotbugs0m 38sbranch/hbase-shaded no spotbugs output file (spotbugsXml.xml)
_ Patch Compile Tests _
+0 🆗mvndep0m 20sMaven dependency ordering for patch
+1 💚mvninstall9m 49sthe patch passed
+1 💚compile6m 11sthe patch passed
+1 💚javac6m 11sthe patch passed
-0 ⚠️checkstyle0m 51shbase-server: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
-0 ⚠️checkstyle1m 37sroot: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
-0 ⚠️whitespace0m 0sThe patch 2 line(s) with tabs.
+1 💚xml0m 5sThe patch has no ill-formed XML file.
+0 🆗spotbugs0m 12shbase-resource-bundle has no data from spotbugs
+0 🆗spotbugs0m 38shbase-shaded has no data from spotbugs
+0 🆗spotbugs0m 25shbase-assembly has no data from spotbugs
_ Other Tests _
+1 💚asflicense0m 59sThe patch does not generate ASF License warnings.
77m 9s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#4178
Optional Testsdupname asflicense javac xml compile spotbugs checkstyle jshint
unameLinux 9d144f90d773 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / f640b7f
Default JavaAdoptOpenJDK-1.8.0_282-b08
checkstylehttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt
checkstylehttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/artifact/yetus-general-check/output/diff-checkstyle-root.txt
whitespacehttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/artifact/yetus-general-check/output/whitespace-tabs.txt
Max. process+thread count57 (vs. ulimit of 30000)
modulesC: hbase-resource-bundle hbase-http hbase-server hbase-shaded hbase-assembly . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/console
versionsgit=2.17.1 maven=3.6.3 spotbugs=4.2.2
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 40sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck --skip-errorprone --exclude-tests-url --build-thread --surefire-first-part-fork-count --surefire-second-part-fork-count
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 44sMaven dependency ordering for branch
+1 💚mvninstall4m 51smaster passed
+1 💚compile4m 25smaster passed
+1 💚javadoc3m 6smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall7m 28sthe patch passed
+1 💚compile4m 19sthe patch passed
+1 💚javac4m 19sthe patch passed
+1 💚javadoc3m 7sthe patch passed
_ Other Tests _
+1 💚unit0m 7shbase-resource-bundle in the patch passed.
+1 💚unit0m 55shbase-http in the patch passed.
-1 ❌unit144m 41shbase-server in the patch failed.
+1 💚unit1m 1shbase-shaded in the patch passed.
+1 💚unit0m 22shbase-assembly in the patch passed.
-1 ❌unit286m 49sroot in the patch failed.
464m 44s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#4178
Optional Testsjavac javadoc unit compile
unameLinux 446cd7044249 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / f640b7f
Default JavaAdoptOpenJDK-1.8.0_282-b08
unithttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
unithttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-root.txt
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/testReport/
Max. process+thread count2587 (vs. ulimit of 30000)
modulesC: hbase-resource-bundle hbase-http hbase-server hbase-shaded hbase-assembly . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

This is a demonstration of visualization of regions on the cluster. The visualization is a stacked
bar chart showing total storefile size per table per region server, with the x-axis being server
names, the y-axis being storfile size, and the bars stacked per table. The visualization is
generated entirely on the fly from within the browser, implemented using Vega Lite. So far, Vega
appears to handle rendering this visualization for a cluster of over 700 region servers with
approximately 300,000 regions.
Per [0], include an update to the top-level LICENSE.txt. Also update LICENSE files in all binary
distributions (i.e., jars), by way of LICENSE.vm. Vega uses a BSD 3-clause variant without
advertising clause, and as such is a "Category A" license, per [1].
No changes are made to the NOTICE files, as per the existing example of bundling the minified
JQuery, which is also a Category A license.
[0]: https://infra.apache.org/licensing-howto.html
[1]: https://www.apache.org/legal/resolved.html#category-a
Signed-off-by: Andrew Purtell <apurtell@apache.org>
@ndimiduk
ndimidukforce-pushed the 25865-region-visualizer branch from 91f8a2d to 4ea9449CompareMarch 15, 2022 19:29
@ndimiduk

Copy link
Copy Markdown
MemberAuthor

Rebased and addressed checkstyle and whitespace issues.

@ndimiduk
ndimiduk merged commit d76e636 into apache:masterMar 15, 2022
@ndimiduk
ndimiduk deleted the 25865-region-visualizer branch March 15, 2022 19:31
@ndimiduk
ndimiduk restored the 25865-region-visualizer branch March 15, 2022 19:43
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.

3 participants

@ndimiduk@Apache-HBase@apurtell