|
[
Permlink
| « Hide
]
Konstantin Boudnik added a comment - 09/Jun/09 08:00 PM
Shell script for folders creation and the patch
This patch includes the following additions:
It is expected to see unit tests failing with faults in place. We might need to develop different kind of tests to utilize fault injection in a better way. The interface of the new framework is as follows:
The rules of faults injection probability calculation are as follows:
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12410248/HADOOP-6003.patch against trunk revision 783672. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 10 new or modified tests. +1 javadoc. The javadoc tool did not generate any 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 Eclipse classpath. The patch causes the Eclipse classpath to differ from the contents of the lib directories. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. -1 contrib tests. The patch failed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/491/testReport/ This message is automatically generated. As far as I can tell this failing test isn't related to the patch at all, because of its orthogonality. Test failure seems to be connected to some sort of configuration issues.
Review of the patch will be highly appreciated! It looks like some of the patches have inconsistent usage of tabs/spaces; you may want to clean that up.
I think you're right on here. It seems like having a global setting for injection probability will mostly lead to test results that are hard to grok. Have you thought about setting up a separate package/target for tests that are designed to interact with injected faults? Once one or two of those tests exists, it'll be clearer whether "ant run-test-hdfs -Dfault.probability.FSDataset=3" is the right API. Indentation inconsistency is fixed.
As for the separate tests development: I agree on that. Different tests would have to be developed with FI in minds. However, for the Phase 1 (e.g. the framework introduction) we might use existing tests if in need to verify certain aspects of the error handling. On the API: I think current proposal will not stand when we'll be talking about complex injection scenarios and would have to replaced with something else. I'm agree that we need to develop some of these scenarios before a better API might be developed. I think the ant command may look like:
ant test -Dfault.injection.enable -Dfault.injection.conf=CONF_FILE All the FI parameters, included probability values, are specified in CONF_FILE. Then, we only have to change conf file but not the build script for the later development. Agree, config file option seems like a good idea. I was planning to add this
later and have this framework to be in place ASAP, but I can surely add this feature right now. One more thing: I believe it would be good to have dynamic configuration i.e. I'll provide config file option shortly. This version of the patch includes a way to define probability levels through a standard Hadoop configuration file. Default location of the config file is conf/fi-site.xml
An alternative location might be set through -Dfault.probability.config= system property Also, one can use a standard build.property file to specify all needed probability levels in the runtime Final modifications:
Slightly different version of the original patch:
conf/fi-site.xml is moved to src/test. build.xml is modified to copy it for test runs. <iajc> task definition is moved inside of the target 'injectfaults' to guarantee that it always defined Couldn't reproduce the issue with ant clean works for me every time. Is it possible that you had some files permission issues? Wrt to TestFileCreation: I have ran this test many times and seen a failure only once. The problem with this test is that while I can confirm that faults methods are called they aren't called frequent enough (i.e. < 80 calls during the test execution) to reach the necessary threshold of 1% to inject a fault. In other words, the instrumented isn't being called often enough. I'd suggest to run TestDirectoryScanner instead where these instrumented functions are called pretty often so the test fails on every run.
I agree with the point - it is misleading when a level of probability set as an integer.
I have fixed the config file comment and ProbabilityModel code to work with the value as a float between 0.00 and 1.00 I think adding a special case to handle '%' is excessive. Default probability for all faults has to be 0.00
Debug output has to have log4j's debug level
Codes look good. Two more minor comments:
After the project split, this issue belongs to hdfs.
JavaDoc comments tags are fixed
Better documentation for the FI classes is written. Other comments are considered and fixes are made. Patch is modified (mostly the modifications of the build.xml file) to reflect the split between projects and renaming of the core to common.
It has been testes and verified that it works with new project structure. +1 patch looks good.
I have committed this. Thanks, Cos!
Forgot to post test-patch results earlier:
[exec] -1 overall.
[exec]
[exec] +1 @author. The patch does not contain any @author tags.
[exec]
[exec] +1 tests included. The patch appears to include 9 new or modified tests.
[exec]
[exec] -1 javadoc. The javadoc tool appears to have generated 1 warning messages.
[exec]
[exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
[exec]
[exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
[exec]
[exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.
The javadoc warnings are not related. See Thanks a bunch, Nicholas!
I'm so sorry to cause so many remarks - it's my very first real patch in the Thanks for your patience and commitment! |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||