ctubbsii commented on code in PR #8104:
URL: https://github.com/apache/hadoop/pull/8104#discussion_r2566746553


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java:
##########
@@ -1199,6 +1199,10 @@ public class DFSConfigKeys extends 
CommonConfigurationKeys {
       "dfs.datanode.enable.fileio.fault.injection";
   public static final boolean
       DFS_DATANODE_ENABLE_FILEIO_FAULT_INJECTION_DEFAULT = false;
+  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";

Review Comment:
   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.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to