The Hadoop gods have seen fit to deprecate OutputCollector and replace it with a non-static inner class of Mapper called Context. This complicates several tests, namely:
./src/test/java/org/apache/mahout/classifier/bayes/BayesFeatureMapperTest.java ./src/test/java/org/apache/mahout/clustering/canopy/TestCanopyCreation.java ./src/test/java/org/apache/mahout/clustering/dirichlet/TestMapReduce.java ./src/test/java/org/apache/mahout/clustering/fuzzykmeans/TestFuzzyKmeansClustering.java ./src/test/java/org/apache/mahout/clustering/kmeans/TestKmeansClustering.java ./src/test/java/org/apache/mahout/clustering/lda/TestMapReduce.java ./src/test/java/org/apache/mahout/clustering/meanshift/TestMeanShift.java ./src/test/java/org/apache/mahout/ga/watchmaker/EvalMapperTest.java and my new LDA test. These won't work in the new api. As far as I can tell, the only ways to fix this are to either: 1) factor out a method that is testable, but this makes the code less idiomatic 2) abuse reflection to create a Mapper.Context (not sure about this, but I imagine it's doable), and supply a utility method for this 3) individually override each Mapper class in each test and include similar logic to get it done. Thoughts? -- David
