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

Ming Ma commented on HBASE-6345:
--------------------------------

Couple comments for Todd and others. I did some my investigation on this topic 
last week and found testing data streaming pipeline in hdfs requires fi. Is 
there any other reasons not to use fi besides "hard to maintain"?

1. I have just got maven + aspectJ working for hbase. It does require some 
learning to write fi test; but it doesn't seem to be that hard.
2. It looks like CheckpointFaultInjector example above requires code change in 
hadoop core. fi doesn't require that. I find it useful to not require core code 
change to inject failure at any place. On frequently called function, adding 
call to fault injector in the core code might have perf impact.
                
> Utilize fault injection in testing using AspectJ
> ------------------------------------------------
>
>                 Key: HBASE-6345
>                 URL: https://issues.apache.org/jira/browse/HBASE-6345
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Zhihong Ted Yu
>
> HDFS uses fault injection to test pipeline failure in addition to mock, spy. 
> HBase uses mock, spy. But there are cases where mock, spy aren't convenient.
> Some example from DFSClientAspects.aj :
> {code}
>   pointcut pipelineInitNonAppend(DataStreamer datastreamer):
>     callCreateBlockOutputStream(datastreamer)
>     && cflow(execution(* nextBlockOutputStream(..)))
>     && within(DataStreamer);
>   after(DataStreamer datastreamer) returning : 
> pipelineInitNonAppend(datastreamer) {
>     LOG.info("FI: after pipelineInitNonAppend: hasError="
>         + datastreamer.hasError + " errorIndex=" + datastreamer.errorIndex);
>     if (datastreamer.hasError) {
>       DataTransferTest dtTest = DataTransferTestUtil.getDataTransferTest();
>       if (dtTest != null)
>         dtTest.fiPipelineInitErrorNonAppend.run(datastreamer.errorIndex);
>     }
>   }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to