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-29026 Replace some deprecated calls #6663

Open
wants to merge 1 commit into
base: branch-2.6
Choose a base branch
from

Conversation

PDavid
Copy link
Contributor

@PDavid PDavid commented Feb 4, 2025

  • Replaced the usage of the following deprecated methods:
    • java.net.URLEncoder.encode(String) -> java.net.URLEncoder.encode(String, String)
    • StringUtils.humanReadableInt(long) -> StringUtils.TraditionalBinaryPrefix.long2String(long, "", 1): For this a new static util method is introduced: org.apache.hadoop.hbase.util.Strings.humanReadableInt
    • org.apache.hadoop.fs.FileSystem.getLength(Path) -> getFileStatus(Path).getLen()
    • org.apache.hadoop.hbase.ServerName.getStartcode() -> org.apache.hadoop.hbase.ServerName.getStartCode()
  • Also removed unused imports in the touched JSP files.

(cherry picked from commit 332d753)

- Replaced the usage of the following deprecated methods:
  - java.net.URLEncoder.encode(String) -> java.net.URLEncoder.encode(String, String)
  - StringUtils.humanReadableInt(long) -> StringUtils.TraditionalBinaryPrefix.long2String(long, "", 1): For this a new static util method is introduced: org.apache.hadoop.hbase.util.Strings.humanReadableInt
  - org.apache.hadoop.fs.FileSystem.getLength(Path) -> getFileStatus(Path).getLen()
  - org.apache.hadoop.hbase.ServerName.getStartcode() -> org.apache.hadoop.hbase.ServerName.getStartCode()
- Also removed unused imports in the touched JSP files.

(cherry picked from commit cc52e79)
(cherry picked from commit 332d753)
@PDavid
Copy link
Contributor Author

PDavid commented Feb 4, 2025

This is the backport of #6585 to branch-2.6.

I applied this with cherry-pick. The patch did not apply 100% cleanly so I had to resolve some conflicts manually.

The difference in this patch (compared to master) is that we cannot use java.net.URLEncoder.encode(String, Charset) because that API method was only introduced in Java 10 and branch-2.6 should support running with Java 8. So we use java.net.URLEncoder.encode(String, String) instead.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 51s 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.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
_ branch-2.6 Compile Tests _
+0 🆗 mvndep 0m 16s Maven dependency ordering for branch
+1 💚 mvninstall 4m 2s branch-2.6 passed
+1 💚 compile 4m 48s branch-2.6 passed
+1 💚 checkstyle 1m 19s branch-2.6 passed
+1 💚 spotbugs 3m 26s branch-2.6 passed
+1 💚 spotless 1m 7s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 16s Maven dependency ordering for patch
+1 💚 mvninstall 3m 59s the patch passed
+1 💚 compile 5m 10s the patch passed
+1 💚 javac 5m 10s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 23s the patch passed
+1 💚 spotbugs 3m 59s the patch passed
+1 💚 hadoopcheck 20m 17s Patch does not cause any errors with Hadoop 2.10.2 or 3.3.6 3.4.0.
+1 💚 spotless 0m 54s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 33s The patch does not generate ASF License warnings.
55m 7s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6663/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #6663
Optional Tests dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
uname Linux 3a1cbb325df6 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.6 / ec860cf
Default Java Eclipse Adoptium-11.0.23+9
Max. process+thread count 77 (vs. ulimit of 30000)
modules C: hbase-common hbase-server hbase-mapreduce U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6663/1/console
versions git=2.34.1 maven=3.9.8 spotbugs=4.7.3
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 February 4, 2025 11:38
@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 3m 25s 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.6 Compile Tests _
+0 🆗 mvndep 0m 10s Maven dependency ordering for branch
+1 💚 mvninstall 2m 37s branch-2.6 passed
+1 💚 compile 1m 18s branch-2.6 passed
+1 💚 javadoc 0m 55s branch-2.6 passed
+1 💚 shadedjars 6m 22s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 16s Maven dependency ordering for patch
+1 💚 mvninstall 3m 8s the patch passed
+1 💚 compile 1m 30s the patch passed
+1 💚 javac 1m 30s the patch passed
+1 💚 javadoc 0m 57s the patch passed
+1 💚 shadedjars 6m 13s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 2m 21s hbase-common in the patch passed.
-1 ❌ unit 295m 40s /patch-unit-hbase-server.txt hbase-server in the patch failed.
+1 💚 unit 18m 14s hbase-mapreduce in the patch passed.
348m 55s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6663/1/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #6663
Optional Tests javac javadoc unit compile shadedjars
uname Linux 221f34ade26a 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.6 / ec860cf
Default Java Temurin-1.8.0_412-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6663/1/testReport/
Max. process+thread count 4143 (vs. ulimit of 30000)
modules C: hbase-common hbase-server hbase-mapreduce U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6663/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 59s 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.6 Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for branch
+1 💚 mvninstall 3m 41s branch-2.6 passed
+1 💚 compile 1m 57s branch-2.6 passed
+1 💚 javadoc 1m 31s branch-2.6 passed
+1 💚 shadedjars 7m 10s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 18s Maven dependency ordering for patch
+1 💚 mvninstall 3m 52s the patch passed
+1 💚 compile 2m 15s the patch passed
+1 💚 javac 2m 15s the patch passed
+1 💚 javadoc 1m 37s the patch passed
+1 💚 shadedjars 9m 11s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 3m 23s hbase-common in the patch passed.
+1 💚 unit 278m 27s hbase-server in the patch passed.
+1 💚 unit 22m 40s hbase-mapreduce in the patch passed.
343m 4s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6663/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #6663
Optional Tests javac javadoc unit compile shadedjars
uname Linux e19026ac75e0 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.6 / ec860cf
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6663/1/testReport/
Max. process+thread count 4414 (vs. ulimit of 30000)
modules C: hbase-common hbase-server hbase-mapreduce U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6663/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 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.6 Compile Tests _
+0 🆗 mvndep 0m 17s Maven dependency ordering for branch
+1 💚 mvninstall 4m 32s branch-2.6 passed
+1 💚 compile 2m 25s branch-2.6 passed
+1 💚 javadoc 1m 13s branch-2.6 passed
+1 💚 shadedjars 8m 29s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 20s Maven dependency ordering for patch
+1 💚 mvninstall 4m 4s the patch passed
+1 💚 compile 1m 51s the patch passed
+1 💚 javac 1m 51s the patch passed
+1 💚 javadoc 1m 3s the patch passed
+1 💚 shadedjars 6m 52s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 2m 36s hbase-common in the patch passed.
-1 ❌ unit 403m 55s /patch-unit-hbase-server.txt hbase-server in the patch failed.
-1 ❌ unit 55m 33s /patch-unit-hbase-mapreduce.txt hbase-mapreduce in the patch failed.
503m 25s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6663/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #6663
Optional Tests javac javadoc unit compile shadedjars
uname Linux 8fd5e9248e9c 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.6 / ec860cf
Default Java Eclipse Adoptium-11.0.23+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6663/1/testReport/
Max. process+thread count 4347 (vs. ulimit of 30000)
modules C: hbase-common hbase-server hbase-mapreduce U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6663/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.

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.

2 participants