Changes to the functional test framework for more useful output when run under MapReduce.
* run.py supports a new -m option. When passed, it produces an extra line of output per test with a code for the test outcome and the test's name (string form of the testcase object). The string is used as the output from the map phase of RunTests. * run.py also exits with status code 1 if any test does not pass, to help with scripting. * The clean_logging method in TestUtils.py was made forgiving when deleting temporary log configuration files. The need for this was seen during testing. * The mapper in RunTests, which runs each functional test, was updated to: * pass -m to run.py * only send the special output triggered by -m to the reduce phase * insert the Hadoop task attempt ID into the special output, to allow testers to trace a test run to its map task * increment counters based on test outcome
The net result of these changes is that a hadoop fs -cat of the reducer output files from the job becomes a report on the overall test results, with a line for each test run with its task attempt ID, outcome code, and task name. In addition, counters can be observed during and after the run to get a glimpse of overall status. Diffs
Ran functional tests under MapReduce on a 3-node VM cluster. Verified the correctness of the reducer output and use of counters. Also tested running run.py directly for correct output generation with -m there. Thanks,
Re: Review Request 18317: ACCUMULO-2380 - More useful output for functional tests run under MR