Skip to content

Conversation

@dlmarion
Copy link

@dlmarion dlmarion commented Nov 26, 2025

Description of PR

This change adds an implementation to FaultInjectorFileIoEvents that responds to related properties. If enabled, then FaultInjectorFileIoEvents will throw an UncheckedIOException for the configured I/O operations at the configured percentage of calls for that operation type.

How was this patch tested?

Patch includes the TestFaultInjectorFileIoEvents unit test and TestDataNodeFileIOFailures test which confirms that exceptions are bubbled up to the HDFS client when a sync operation via hsync, CreateMode.SYNC_BLOCK and dfs.datanode.synconclose throw an exception.

For code changes:

  • [x ] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • 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?

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 53s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 34m 36s trunk passed
+1 💚 compile 1m 26s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 compile 1m 27s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 checkstyle 0m 56s trunk passed
+1 💚 mvnsite 1m 38s trunk passed
+1 💚 javadoc 1m 11s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 javadoc 1m 9s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
-1 ❌ spotbugs 3m 51s /branch-spotbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html hadoop-hdfs-project/hadoop-hdfs in trunk has 291 extant spotbugs warnings.
+1 💚 shadedclient 31m 36s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 1m 21s the patch passed
+1 💚 compile 1m 18s the patch passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 javac 1m 18s the patch passed
+1 💚 compile 1m 17s the patch passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 javac 1m 17s the patch passed
-1 ❌ blanks 0m 0s /blanks-eol.txt The patch has 15 line(s) that end in blanks. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
-1 ❌ blanks 0m 0s /blanks-tabs.txt The patch 107 line(s) with tabs.
-0 ⚠️ checkstyle 0m 44s /results-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt hadoop-hdfs-project/hadoop-hdfs: The patch generated 124 new + 199 unchanged - 0 fixed = 323 total (was 199)
+1 💚 mvnsite 1m 28s the patch passed
-1 ❌ javadoc 0m 58s /results-javadoc-javadoc-hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04.txt hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04 with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04 generated 3 new + 9997 unchanged - 3 fixed = 10000 total (was 10000)
-1 ❌ javadoc 1m 0s /results-javadoc-javadoc-hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04 with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04 generated 3 new + 9671 unchanged - 0 fixed = 9674 total (was 9671)
+1 💚 spotbugs 3m 48s the patch passed
+1 💚 shadedclient 28m 43s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 216m 47s /patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt hadoop-hdfs in the patch passed.
-1 ❌ asflicense 0m 45s /results-asflicense.txt The patch generated 2 ASF License warnings.
335m 1s
Reason Tests
Failed junit tests hadoop.hdfs.server.balancer.TestBalancerWithHANameNodes
hadoop.hdfs.tools.TestDFSAdmin
hadoop.hdfs.server.datanode.fsdataset.impl.TestFsVolumeList
hadoop.tools.TestHdfsConfigFields
Subsystem Report/Notes
Docker ClientAPI=1.52 ServerAPI=1.52 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8104/1/artifact/out/Dockerfile
GITHUB PR #8104
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets xmllint
uname Linux 14cfe5a10f04 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 5e2efba
Default Java Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8104/1/testReport/
Max. process+thread count 3551 (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-8104/1/console
versions git=2.25.1 maven=3.9.11 spotbugs=4.9.7
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@github-actions github-actions bot added the Infra label Nov 26, 2025
@hadoop-yetus
Copy link

(!) A patch to the testing environment has been detected.
Re-executing against the patched versions to perform further tests.
The console is at https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8104/5/console in case of problems.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ docker 0m 1s Docker failed to build run-specific yetus/hadoop:tp-7365}.
Subsystem Report/Notes
GITHUB PR #8104
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8104/5/console
versions git=2.34.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

(!) A patch to the testing environment has been detected.
Re-executing against the patched versions to perform further tests.
The console is at https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8104/6/console in case of problems.

Comment on lines +1202 to +1205
public static final String DFS_DATANODE_ENABLED_OPS_FILEIO_FAULT_INJECTION_KEY =
"dfs.datanode.enabled.operations.fileio.fault.injection";
public static final String DFS_DATANODE_FILEIO_FAULT_PERCENTAGE_KEY =
"dfs.datanode.fileio.fault.sampling.percentage";
Copy link
Member

Choose a reason for hiding this comment

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

These three key prefixes are very different for a common set of related properties, and that is a bit confusing, since related properties don't share a common prefix:

  • dfs.datanode.enable.fileio.fault.*
  • dfs.datanode.enabled.operations.fileio.fault.*
  • dfs.datanode.fileio.fault.*

It would be good if these could be standardized on something... like:

  • dfs.datanode.fileio.fault.*

Also, is "sampling" the right word here? Isn't it simulating (or injecting), not sampling? It could also just be called "rate".

All three properties could be merged into a single one:

  • dfs.datanode.fault.injection.fileio=operation1:20%,operation2:5%

Then, a default empty value would imply no fault injection, and the pre-existing property could be obsoleted. The prefix dfs.datanode.fault.injection.* could also be support other kinds of fault injection in the future, rather than just fileio types.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 0s 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 🆗 xmllint 0m 0s xmllint 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 35m 43s trunk passed
+1 💚 compile 1m 26s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 compile 1m 25s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 checkstyle 0m 55s trunk passed
+1 💚 mvnsite 1m 36s trunk passed
+1 💚 javadoc 1m 12s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 javadoc 1m 9s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
-1 ❌ spotbugs 3m 51s /branch-spotbugs-hadoop-hdfs-project_hadoop-hdfs-warnings.html hadoop-hdfs-project/hadoop-hdfs in trunk has 291 extant spotbugs warnings.
+1 💚 shadedclient 28m 42s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 1m 22s the patch passed
+1 💚 compile 1m 18s the patch passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 javac 1m 18s the patch passed
+1 💚 compile 1m 15s the patch passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 javac 1m 15s the patch passed
-1 ❌ blanks 0m 0s /blanks-tabs.txt The patch 2 line(s) with tabs.
-0 ⚠️ checkstyle 0m 44s /results-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt hadoop-hdfs-project/hadoop-hdfs: The patch generated 26 new + 200 unchanged - 0 fixed = 226 total (was 200)
+1 💚 mvnsite 1m 27s the patch passed
-1 ❌ javadoc 0m 59s /results-javadoc-javadoc-hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04.txt hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04 with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04 generated 4 new + 9996 unchanged - 4 fixed = 10000 total (was 10000)
-1 ❌ javadoc 1m 1s /results-javadoc-javadoc-hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt hadoop-hdfs-project_hadoop-hdfs-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04 with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04 generated 4 new + 9671 unchanged - 0 fixed = 9675 total (was 9671)
+1 💚 spotbugs 3m 50s the patch passed
+1 💚 shadedclient 28m 39s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 214m 31s /patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt hadoop-hdfs in the patch passed.
-1 ❌ asflicense 0m 49s /results-asflicense.txt The patch generated 2 ASF License warnings.
331m 7s
Reason Tests
Failed junit tests hadoop.hdfs.tools.TestDFSAdmin
hadoop.tools.TestHdfsConfigFields
Subsystem Report/Notes
Docker ClientAPI=1.52 ServerAPI=1.52 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8104/4/artifact/out/Dockerfile
GITHUB PR #8104
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets xmllint
uname Linux 0c82e45b8528 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / ff5b71f
Default Java Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8104/4/testReport/
Max. process+thread count 3477 (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-8104/4/console
versions git=2.25.1 maven=3.9.11 spotbugs=4.9.7
Powered by Apache Yetus 0.14.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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants