Skip to content

HDFS-17884. Remove forked Guava TimeoutFuture#8268

Open
pan3793 wants to merge 1 commit intoapache:trunkfrom
pan3793:HDFS-17884
Open

HDFS-17884. Remove forked Guava TimeoutFuture#8268
pan3793 wants to merge 1 commit intoapache:trunkfrom
pan3793:HDFS-17884

Conversation

@pan3793
Copy link
Member

@pan3793 pan3793 commented Feb 23, 2026

Description of PR

Those classes were forked from Guava in HDFS-11511. During those days, Hadoop used Guava 11, which didn't support TimeoutFuture.

Now Hadoop uses Guava 33, so it's unnecessary to maintain those forked classes, this change simplifies the codebase, also eliminates sun.misc.Unsafe usage.

How was this patch tested?

Pass UT added by HDFS-11511

$ ./mvnw -pl :hadoop-hdfs -am clean install -DskipTests
$ ./mvnw -pl :hadoop-hdfs test "-Dtest=org.apache.hadoop.hdfs.server.datanode.checker.Test*"
...
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.hadoop.hdfs.server.datanode.checker.TestDatasetVolumeChecker
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.991 s -- in org.apache.hadoop.hdfs.server.datanode.checker.TestDatasetVolumeChecker
[INFO] Running org.apache.hadoop.hdfs.server.datanode.checker.TestDatasetVolumeCheckerFailures
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.858 s -- in org.apache.hadoop.hdfs.server.datanode.checker.TestDatasetVolumeCheckerFailures
[INFO] Running org.apache.hadoop.hdfs.server.datanode.checker.TestDatasetVolumeCheckerTimeout
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.836 s -- in org.apache.hadoop.hdfs.server.datanode.checker.TestDatasetVolumeCheckerTimeout
[INFO] Running org.apache.hadoop.hdfs.server.datanode.checker.TestThrottledAsyncChecker
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.708 s -- in org.apache.hadoop.hdfs.server.datanode.checker.TestThrottledAsyncChecker
[INFO] Running org.apache.hadoop.hdfs.server.datanode.checker.TestThrottledAsyncCheckerTimeout
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.649 s -- in org.apache.hadoop.hdfs.server.datanode.checker.TestThrottledAsyncCheckerTimeout
[INFO] Running org.apache.hadoop.hdfs.server.datanode.checker.TestStorageLocationChecker
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.898 s -- in org.apache.hadoop.hdfs.server.datanode.checker.TestStorageLocationChecker
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 30, Failures: 0, Errors: 0, Skipped: 0
...

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (HDFS-17884)?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

AI Tooling

No AI usage.

@slfan1989
Copy link
Contributor

@zhtttylz @huangzhaobo99 Could you please review this PR? Thanks a lot!

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 22s 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 💚 test4tests 0m 0s The patch appears to include 2 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 27m 44s trunk passed
+1 💚 compile 1m 2s trunk passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 compile 0m 55s trunk passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 checkstyle 0m 57s trunk passed
+1 💚 mvnsite 1m 2s trunk passed
+1 💚 javadoc 0m 48s trunk passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 javadoc 0m 48s trunk passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 spotbugs 2m 14s trunk passed
+1 💚 shadedclient 17m 1s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 42s the patch passed
+1 💚 compile 0m 39s the patch passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 javac 0m 39s hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-21.0.10+7-Ubuntu-124.04 with JDK Ubuntu-21.0.10+7-Ubuntu-124.04 generated 0 new + 0 unchanged - 7 fixed = 0 total (was 7)
+1 💚 compile 0m 41s the patch passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 javac 0m 41s hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-17.0.18+8-Ubuntu-124.04.1 with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1 generated 0 new + 0 unchanged - 7 fixed = 0 total (was 7)
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 42s hadoop-hdfs-project/hadoop-hdfs: The patch generated 0 new + 6 unchanged - 22 fixed = 6 total (was 28)
+1 💚 mvnsite 0m 45s the patch passed
+1 💚 javadoc 0m 35s the patch passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 javadoc 0m 36s the patch passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 spotbugs 2m 0s the patch passed
+1 💚 shadedclient 16m 22s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 182m 13s /patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt hadoop-hdfs in the patch passed.
+1 💚 asflicense 0m 26s The patch does not generate ASF License warnings.
257m 52s
Reason Tests
Failed junit tests hadoop.hdfs.server.balancer.TestBalancerWithHANameNodes
hadoop.hdfs.TestBlockRecoveryCauseStandbyNameNodeCrash
Subsystem Report/Notes
Docker ClientAPI=1.53 ServerAPI=1.53 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8268/1/artifact/out/Dockerfile
GITHUB PR #8268
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux e2fe9ad6991f 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 02dc1f9
Default Java Ubuntu-17.0.18+8-Ubuntu-124.04.1
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.10+7-Ubuntu-124.04 /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.18+8-Ubuntu-124.04.1
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8268/1/testReport/
Max. process+thread count 4838 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8268/1/console
versions git=2.43.0 maven=3.9.11 spotbugs=4.9.7
Powered by Apache Yetus 0.14.1 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants