hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhihong Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-6345) Utilize fault injection in testing using AspectJ
Date Fri, 06 Jul 2012 23:20:33 GMT

     [ https://issues.apache.org/jira/browse/HBASE-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Zhihong Ted Yu updated HBASE-6345:
----------------------------------

    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 :
{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}

  was: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.

    
> 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

        

Mime
View raw message