Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
-
None
Description
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 :
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); } }