Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-435 Add orthogonal fault injection mechanism/framework
  3. HDFS-444

Current fault injection framework implementation doesn't allow to change probability levels dynamically

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.21.0
    • Fix Version/s: 0.21.0
    • Component/s: test
    • Labels:
      None
    1. HDFS-444.patch
      3 kB
      Konstantin Boudnik

      Activity

      Hide
      Konstantin Boudnik added a comment -

      It has turned out that there are cases when a developer might need to turn certain faults on and off during the execution of a test. A typical example would be:

      • a test sets up all needed environment, create some files, etc.
      • a test case's is begun
      • at some point of this execution the scenario would require a certain fault to start happening with a certain level of probability
      • a test can achieve it by setting new system property as follows
          System.setProperty("fi.myClassName.FIpoint", ".40");
        
      • next invocation of myClassName's advice will check for the value of the property above and will trigger the fault if probability condition is met
      • after some time the test might need to turn off this specific fault injection, however an expected solution of
          System.setProperty("fi.myClassName.FIpoint", ".0");
        

        won't work because current framework implementation doesn't allow to reset the properties once they were set.

      It is a minor issue, which can affect some of new tests developed based on the FI framework

      Show
      Konstantin Boudnik added a comment - It has turned out that there are cases when a developer might need to turn certain faults on and off during the execution of a test. A typical example would be: a test sets up all needed environment, create some files, etc. a test case's is begun at some point of this execution the scenario would require a certain fault to start happening with a certain level of probability a test can achieve it by setting new system property as follows System .setProperty( "fi.myClassName.FIpoint" , ".40" ); next invocation of myClassName's advice will check for the value of the property above and will trigger the fault if probability condition is met after some time the test might need to turn off this specific fault injection, however an expected solution of System .setProperty( "fi.myClassName.FIpoint" , ".0" ); won't work because current framework implementation doesn't allow to reset the properties once they were set. It is a minor issue, which can affect some of new tests developed based on the FI framework
      Hide
      Boris Shkolnik added a comment -

      +1
      Seems like a good option.

      Show
      Boris Shkolnik added a comment - +1 Seems like a good option.
      Hide
      Konstantin Boudnik added a comment -

      This patch takes care about the issue and allow a once set property to be changed dynamically.
      Also, methods' comments are converted to JavaDoc to provide a guide for aspects & test developers.

      Show
      Konstantin Boudnik added a comment - This patch takes care about the issue and allow a once set property to be changed dynamically. Also, methods' comments are converted to JavaDoc to provide a guide for aspects & test developers.
      Hide
      Konstantin Boudnik added a comment -

      Mentioned javadoc warnings are coming from DFSClient class and are unrelated.

      -1 overall.

      +1 @author. The patch does not contain any @author tags.

      +1 tests included. The patch appears to include 6 new or modified tests.

      -1 javadoc. The javadoc tool appears to have generated 1 warning messages.

      +1 javac. The applied patch does not increase the total number of javac compiler warnings.

      +1 findbugs. The patch does not introduce any new Findbugs warnings.

      +1 release audit. The applied patch does not increase the total number of release audit warnings.

      Show
      Konstantin Boudnik added a comment - Mentioned javadoc warnings are coming from DFSClient class and are unrelated. -1 overall. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 6 new or modified tests. -1 javadoc. The javadoc tool appears to have generated 1 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings.
      Hide
      Tsz Wo Nicholas Sze added a comment -

      +1 patch looks good.

      Show
      Tsz Wo Nicholas Sze added a comment - +1 patch looks good.
      Hide
      Tsz Wo Nicholas Sze added a comment -

      I have committed this. Thanks, Cos!

      Show
      Tsz Wo Nicholas Sze added a comment - I have committed this. Thanks, Cos!
      Hide
      Hudson added a comment -

      Integrated in Hadoop-Hdfs-trunk #8 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/8/)

      Show
      Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #8 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/8/ )

        People

        • Assignee:
          Konstantin Boudnik
          Reporter:
          Konstantin Boudnik
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development