-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HDFS-17857. Provide implementation for FaultInjectorFileIoEvents #8104
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
base: trunk
Are you sure you want to change the base?
Conversation
|
💔 -1 overall
This message was automatically generated. |
|
(!) A patch to the testing environment has been detected. |
|
💔 -1 overall
This message was automatically generated. |
|
(!) A patch to the testing environment has been detected. |
| 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"; |
There was a problem hiding this comment.
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.
|
💔 -1 overall
This message was automatically generated. |
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_BLOCKanddfs.datanode.synconclosethrow an exception.For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?