Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-6345

Utilize fault injection in testing using AspectJ

    XMLWordPrintableJSON

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);
          }
        }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            zhihyu@ebaysf.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: