Issue Details (XML | Word | Printable)

Key: HDFS-444
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Konstantin Boudnik
Reporter: Konstantin Boudnik
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Hadoop HDFS
HDFS-435

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

Created: 23/Jun/09 11:42 PM   Updated: 30/Jun/09 12:49 PM
Return to search
Component/s: test
Affects Version/s: 0.21.0
Fix Version/s: 0.21.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works HDFS-444.patch 2009-06-24 06:33 PM Konstantin Boudnik 3 kB

Resolution Date: 25/Jun/09 09:12 PM


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Konstantin Boudnik added a comment - 23/Jun/09 11:49 PM
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


Boris Shkolnik added a comment - 24/Jun/09 12:24 AM
+1
Seems like a good option.

Konstantin Boudnik added a comment - 24/Jun/09 06:33 PM
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.

Konstantin Boudnik added a comment - 24/Jun/09 06:47 PM
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.


Tsz Wo (Nicholas), SZE added a comment - 25/Jun/09 09:06 PM
+1 patch looks good.

Tsz Wo (Nicholas), SZE added a comment - 25/Jun/09 09:12 PM
I have committed this. Thanks, Cos!

Hudson added a comment - 30/Jun/09 12:49 PM
Integrated in Hadoop-Hdfs-trunk #8 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/8/)