[ 
https://issues.apache.org/jira/browse/HDFS-17857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18040917#comment-18040917
 ] 

ASF GitHub Bot commented on HDFS-17857:
---------------------------------------

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.





> Create implementation for FaultInjectorFileIoEvents
> ---------------------------------------------------
>
>                 Key: HDFS-17857
>                 URL: https://issues.apache.org/jira/browse/HDFS-17857
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs
>            Reporter: Dave Marion
>            Assignee: Dave Marion
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 3.5.0
>
>
> The existing FaultInjectorFileIoEvents methods have no implementation and the 
> current implementation does not load a user supplied class that implements 
> some interface. I think the only way that this could be used is for someone 
> to create their own class with the same name and either insert it into the 
> jar, or place a new jar at the beginning of the classpath.
> I think the existing FaultInjectorFileIoEvents class can be modified to throw 
> exceptions for file I/O events.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to