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

Xiaoyu Yao commented on HDFS-10913:
-----------------------------------

Thanks [~xiaobingo] for reporting the issue and posting the patch for it. The 
patch looks good to me overall. I only have one question about the unit test: 
Can you override the new delay methods in DataNodeFaultInjector to include 
delay with verifications if possible. e.g., 

{code}
  final DataNodeFaultInjector dnInjector = new DataNodeFaultInjector() {
  @Override
    public void delayWritingDataToDisk() throws IOException {
      try { 
         Thread.sleep(xxxx);    
      }catch (InterruptedException ie) {
         throw new IOException("Interrupted while sleeping. Bailing out.");
      }
    }
  }
{code}

> Refactor BlockReceiver by introducing faults injector to enhance testability 
> of detecting slow mirrors
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-10913
>                 URL: https://issues.apache.org/jira/browse/HDFS-10913
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode
>    Affects Versions: 2.8.0
>            Reporter: Xiaobing Zhou
>            Assignee: Xiaobing Zhou
>         Attachments: HDFS-10913.000.patch, HDFS-10913.001.patch
>
>
> BlockReceiver#datanodeSlowLogThresholdMs is used as threshold to detect slow 
> mirrors. BlockReceiver only writes some warning logs. In order to better test 
> behaviors of slow mirrors, it necessitates introducing fault injectors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to