Skip to content

Conversation

@PDavid
Copy link
Contributor

@PDavid PDavid commented May 26, 2025

Before HBase UI always tried to load userSnapshots.jsp with an AJAX request on all UI pages - NOK.

This happened even on RegionServer UI or REST UI where this call always failed with HTTP 500.

From now on HBase UI only loads userSnapshots.jsp when the Snapshots tab (div with tab_userSnapshots ID) exists on the page.

Also did a minor improvement to tab.js: use const instead of var as var has so many problems:

With block-level scope, no hoisting, and the ability to declare constants, let and const make code more predictable, maintainable, and less error-prone. By using let and const instead of var, developers can avoid common pitfalls and write more declarative code.

Also fixed a whitespace.

…#6627)

* HBASE-29093 Load userSnapshots.jsp only on master status page

Before HBase UI always tried to load userSnapshots.jsp with an AJAX request on all UI pages - NOK.

This happened even on RegionServer UI or REST UI where this call always fail with HTTP 500.

From now on HBase UI only loads userSnapshots.jsp when the Snapshots tab (div with tab_userSnapshots ID) exists on the page.

* HBASE-29093 Minor JS improvements

- Use const instead of var as var has so many problems (global context, etc).
- Fixed whitespace.

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Nihal Jain <nihaljain@apache.org
Signed-off-by: Peter Somogyi <psomogyi@apache.org
(cherry picked from commit fa22ba4)
@PDavid
Copy link
Contributor Author

PDavid commented May 26, 2025

This is a backport of #6627 on branch-2.

Tested this locally the same way as described here: #6627 (comment)

We backported the patch to every active branch but I just noticed that we forgot to backport this to branch-2. The HBASE-29093 Jira ticket is in resolved state. Should I reopen it? Or open a new Jira for this backport?

What do you think?

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 56s 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.
+0 🆗 jshint 0m 0s jshint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ branch-2 Compile Tests _
+1 💚 mvninstall 3m 31s branch-2 passed
+1 💚 spotless 0m 49s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚 mvninstall 3m 7s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 spotless 0m 45s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 11s The patch does not generate ASF License warnings.
11m 6s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7034/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #7034
Optional Tests dupname asflicense javac codespell detsecrets jshint spotless
uname Linux 2e5763ed2708 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 branch-2 / d895933
Default Java Eclipse Adoptium-11.0.23+9
Max. process+thread count 63 (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-7034/1/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 51s Docker mode activated.
-0 ⚠️ yetus 0m 5s Unprocessed 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 _
+1 💚 mvninstall 3m 14s branch-2 passed
+1 💚 javadoc 0m 28s branch-2 passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 4s the patch passed
+1 💚 javadoc 0m 28s the patch passed
_ Other Tests _
+1 💚 unit 210m 1s hbase-server in the patch passed.
222m 38s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7034/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #7034
Optional Tests javac javadoc unit
uname Linux b34b74016f52 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 branch-2 / d895933
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7034/1/testReport/
Max. process+thread count 4107 (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-7034/1/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 46s Docker mode activated.
-0 ⚠️ yetus 0m 5s Unprocessed 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 _
+1 💚 mvninstall 3m 27s branch-2 passed
+1 💚 javadoc 0m 29s branch-2 passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 14s the patch passed
+1 💚 javadoc 0m 26s the patch passed
_ Other Tests _
+1 💚 unit 221m 17s hbase-server in the patch passed.
234m 0s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7034/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #7034
Optional Tests javac javadoc unit
uname Linux 41dc96ebe126 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 branch-2 / d895933
Default Java Eclipse Adoptium-11.0.23+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7034/1/testReport/
Max. process+thread count 4524 (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-7034/1/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 46s Docker mode activated.
-0 ⚠️ yetus 0m 6s Unprocessed 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 _
+1 💚 mvninstall 2m 41s branch-2 passed
+1 💚 javadoc 0m 26s branch-2 passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 30s the patch passed
+1 💚 javadoc 0m 26s the patch passed
_ Other Tests _
+1 💚 unit 224m 19s hbase-server in the patch passed.
235m 47s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7034/1/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #7034
Optional Tests javac javadoc unit
uname Linux b864a4374ed3 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 branch-2 / d895933
Default Java Temurin-1.8.0_412-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7034/1/testReport/
Max. process+thread count 4264 (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-7034/1/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.

@PDavid PDavid marked this pull request as ready for review May 26, 2025 18:44
@petersomogyi petersomogyi merged commit e5c6c71 into apache:branch-2 May 27, 2025
1 check passed
@PDavid PDavid deleted the HBASE-29093-ui-load-userSnapshots.jsp-branch-2 branch May 27, 2025 06:35
mokai87 pushed a commit to mokai87/hbase that referenced this pull request Aug 7, 2025
…#6627) (apache#7034)

* HBASE-29093 Load userSnapshots.jsp only on master status page

Before HBase UI always tried to load userSnapshots.jsp with an AJAX request on all UI pages - NOK.

This happened even on RegionServer UI or REST UI where this call always fail with HTTP 500.

From now on HBase UI only loads userSnapshots.jsp when the Snapshots tab (div with tab_userSnapshots ID) exists on the page.

* HBASE-29093 Minor JS improvements

- Use const instead of var as var has so many problems (global context, etc).
- Fixed whitespace.

(cherry picked from commit fa22ba4)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Nihal Jain <nihaljain@apache.org
Signed-off-by: Peter Somogyi <psomogyi@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