Thanks Tom! I have divided the patch into two parts (
MAPREDUCE-3369_rev2_part1.patch and MAPREDUCE-3369_rev2_part2.patch). part1 just moves and copies files, equivalent to the mv, mkdir and cp commands in mv-cp.sh attachment. part2 contains any post mv diffs to make the tests successfully pass.
In part1, and in order to avoid breaking the ant build under hadoop-mapreduce-project/src, only the tests were moved, other example or utility classes needed by the test were just copied under the mvn tree.
I have tried with tens of tests that use the MiniMRCluster directly or indirectly (e.g. through HadoopTestCase). In the uploaded patch I have only moved tests that passed successfully with no changes or few minor changes (a total of 29 tests in this patch).
Within the investigated tests, I didn't move tests that are depended on MR1 server-side (e.g. jobtracker-specific). Also some tests didn't seem to be dependent on MR1 but had failures when I moved them. I tried to investigate some of these failures, but it was taking time and I wasn't sure if such failures are a result of bugs in MR2 or changes to be done in the tests. I agree with you that we can handle such cases in separate following tickets and keep the current ticket for only the tests that passes successfully.