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-25896 Implement a Region Visualization on Master WebUI #4178

Merged
merged 1 commit into from
Mar 15, 2022

Conversation

ndimiduk
Copy link
Member

@ndimiduk ndimiduk commented Mar 7, 2022

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
Member Author

ndimiduk commented Mar 7, 2022

This PR is on top of #4177

Copy link
Contributor

@apurtell apurtell left a comment

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
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
Member Author

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.

@@ -689,9 +691,16 @@ protected MasterRpcServices createRpcServices() throws IOException {
@Override
protected void configureInfoServer(InfoServer infoServer) {
infoServer.addUnprivilegedServlet("master-status", "/master-status", MasterStatusServlet.class);
infoServer.addUnprivilegedServlet("api_v1", "/api/v1/*", buildApiV1Servlet());
Copy link
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
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
Member Author

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 ndimiduk force-pushed the 25865-region-visualizer branch 2 times, most recently from fb8d724 to 63a849c Compare March 10, 2022 14:33
@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 37s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 jshint 0m 0s jshint was not available.
+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 _
+0 🆗 mvndep 0m 53s Maven dependency ordering for branch
+1 💚 mvninstall 4m 17s master passed
+1 💚 compile 9m 59s master passed
+1 💚 checkstyle 2m 4s master passed
-1 ❌ spotbugs 1m 57s hbase-server in master has 1 extant spotbugs warnings.
-1 ❌ spotbugs 12m 34s root in master has 1 extant spotbugs warnings.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for patch
+1 💚 mvninstall 3m 22s the patch passed
+1 💚 compile 12m 5s the patch passed
-0 ⚠️ javac 12m 5s root generated 1 new + 1468 unchanged - 1 fixed = 1469 total (was 1469)
-0 ⚠️ checkstyle 1m 44s root: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
-0 ⚠️ whitespace 0m 0s The patch 2 line(s) with tabs.
+1 💚 xml 0m 7s The patch has no ill-formed XML file.
+1 💚 hadoopcheck 15m 45s Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.
+1 💚 spotbugs 15m 16s the patch passed
_ Other Tests _
+1 💚 asflicense 1m 11s The patch does not generate ASF License warnings.
91m 14s
Subsystem Report/Notes
Docker ClientAPI=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 Tests dupname asflicense javac hadoopcheck xml compile spotbugs hbaseanti checkstyle jshint
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / be0afbf
Default Java AdoptOpenJDK-1.8.0_282-b08
spotbugs https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/artifact/yetus-general-check/output/branch-spotbugs-hbase-server-warnings.html
spotbugs https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/artifact/yetus-general-check/output/branch-spotbugs-root-warnings.html
javac https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/artifact/yetus-general-check/output/diff-compile-javac-root.txt
checkstyle https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/artifact/yetus-general-check/output/diff-checkstyle-root.txt
whitespace https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/artifact/yetus-general-check/output/whitespace-tabs.txt
Max. process+thread count 87 (vs. ulimit of 30000)
modules C: hbase-resource-bundle hbase-http hbase-server hbase-shaded hbase-assembly . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/console
versions git=2.17.1 maven=3.6.3 spotbugs=4.2.2
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 1m 14s 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 _
+0 🆗 mvndep 0m 38s Maven dependency ordering for branch
+1 💚 mvninstall 4m 50s master passed
+1 💚 compile 3m 33s master passed
+1 💚 shadedjars 6m 1s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 4m 41s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 23s Maven dependency ordering for patch
+1 💚 mvninstall 4m 53s the patch passed
+1 💚 compile 3m 46s the patch passed
+1 💚 javac 3m 46s the patch passed
+1 💚 shadedjars 6m 6s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 5m 7s the patch passed
_ Other Tests _
-1 ❌ unit 377m 39s root in the patch failed.
423m 16s
Subsystem Report/Notes
Docker ClientAPI=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / be0afbf
Default Java AdoptOpenJDK-11.0.10+9
unit https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-root.txt
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/testReport/
Max. process+thread count 2508 (vs. ulimit of 30000)
modules C: hbase-resource-bundle hbase-http hbase-server hbase-shaded hbase-assembly . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/2/console
versions git=2.17.1 maven=3.6.3
Powered by Apache 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
@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ docker 0m 0s Docker command '/usr/bin/docker' is too old (1.41 < API v 1.27.0).
Subsystem Report/Notes
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/console
versions git=2.17.1
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 1m 7s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed 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 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 jshint 0m 0s jshint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 24s Maven dependency ordering for branch
+1 💚 mvninstall 6m 3s master passed
+1 💚 compile 6m 14s master passed
+1 💚 checkstyle 3m 3s master passed
+0 🆗 spotbugs 0m 27s branch/hbase-assembly no spotbugs output file (spotbugsXml.xml)
+0 🆗 spotbugs 0m 12s branch/hbase-resource-bundle no spotbugs output file (spotbugsXml.xml)
+0 🆗 spotbugs 0m 38s branch/hbase-shaded no spotbugs output file (spotbugsXml.xml)
_ Patch Compile Tests _
+0 🆗 mvndep 0m 20s Maven dependency ordering for patch
+1 💚 mvninstall 9m 49s the patch passed
+1 💚 compile 6m 11s the patch passed
+1 💚 javac 6m 11s the patch passed
-0 ⚠️ checkstyle 0m 51s hbase-server: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
-0 ⚠️ checkstyle 1m 37s root: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
-0 ⚠️ whitespace 0m 0s The patch 2 line(s) with tabs.
+1 💚 xml 0m 5s The patch has no ill-formed XML file.
+0 🆗 spotbugs 0m 12s hbase-resource-bundle has no data from spotbugs
+0 🆗 spotbugs 0m 38s hbase-shaded has no data from spotbugs
+0 🆗 spotbugs 0m 25s hbase-assembly has no data from spotbugs
_ Other Tests _
+1 💚 asflicense 0m 59s The patch does not generate ASF License warnings.
77m 9s
Subsystem Report/Notes
Docker ClientAPI=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 Tests dupname asflicense javac xml compile spotbugs checkstyle jshint
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / f640b7f
Default Java AdoptOpenJDK-1.8.0_282-b08
checkstyle https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt
checkstyle https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/artifact/yetus-general-check/output/diff-checkstyle-root.txt
whitespace https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/artifact/yetus-general-check/output/whitespace-tabs.txt
Max. process+thread count 57 (vs. ulimit of 30000)
modules C: hbase-resource-bundle hbase-http hbase-server hbase-shaded hbase-assembly . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/console
versions git=2.17.1 maven=3.6.3 spotbugs=4.2.2
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.
-0 ⚠️ yetus 0m 3s Unprocessed 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 🆗 mvndep 0m 44s Maven dependency ordering for branch
+1 💚 mvninstall 4m 51s master passed
+1 💚 compile 4m 25s master passed
+1 💚 javadoc 3m 6s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for patch
+1 💚 mvninstall 7m 28s the patch passed
+1 💚 compile 4m 19s the patch passed
+1 💚 javac 4m 19s the patch passed
+1 💚 javadoc 3m 7s the patch passed
_ Other Tests _
+1 💚 unit 0m 7s hbase-resource-bundle in the patch passed.
+1 💚 unit 0m 55s hbase-http in the patch passed.
-1 ❌ unit 144m 41s hbase-server in the patch failed.
+1 💚 unit 1m 1s hbase-shaded in the patch passed.
+1 💚 unit 0m 22s hbase-assembly in the patch passed.
-1 ❌ unit 286m 49s root in the patch failed.
464m 44s
Subsystem Report/Notes
Docker ClientAPI=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 Tests javac javadoc unit compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / f640b7f
Default Java AdoptOpenJDK-1.8.0_282-b08
unit https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
unit https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-root.txt
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/testReport/
Max. process+thread count 2587 (vs. ulimit of 30000)
modules C: hbase-resource-bundle hbase-http hbase-server hbase-shaded hbase-assembly . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4178/3/console
versions git=2.17.1 maven=3.6.3
Powered by Apache 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
Copy link
Member Author

Rebased and addressed checkstyle and whitespace issues.

@ndimiduk ndimiduk merged commit d76e636 into apache:master Mar 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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants