Yes, you can't use this recommender directly, since it has no no-arg constructor. It by itself is not a complete recommender system -- it doesn't have a DataModel. You need to write your own wrapper implementation of Recommender which constructs a complete delegate inside. See the examples in the javadoc or book.
On Sat, Nov 20, 2010 at 11:23 AM, Stefano Bellasio < [email protected]> wrote: > Ok, im searching for that, but first of all, before that error i see > > java.lang.IllegalStateException: java.lang.NoSuchMethodException: > org.apache.mahout.cf.taste.impl.recommender.GenericItemBasedRecommender.<init>(org.apache.mahout.cf.taste.model.DataModel) > at > org.apache.mahout.cf.taste.hadoop.pseudo.RecommenderReducer.setup(RecommenderReducer.java:81) > at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:174) > at > org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:566) > at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:408) > at > org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:216) > Caused by: java.lang.NoSuchMethodException: > org.apache.mahout.cf.taste.impl.recommender.GenericItemBasedRecommender.<init>(org.apache.mahout.cf.taste.model.DataModel) > at java.lang.Class.getConstructor0(Class.java:2706) > at java.lang.Class.getConstructor(Class.java:1657) > at > org.apache.mahout.cf.taste.hadoop.pseudo.RecommenderReducer.setup(RecommenderReducer.java:78) > ... 4 more > 10/11/20 12:21:50 INFO mapred.JobClient: Job complete: job_local_0001 > 10/11/20 12:21:50 INFO mapred.JobClient: Counters: 14 > 10/11/20 12:21:50 INFO mapred.JobClient: FileSystemCounters > 10/11/20 12:21:50 INFO mapred.JobClient: FILE_BYTES_READ=17546530 > 10/11/20 12:21:50 INFO mapred.JobClient: HDFS_BYTES_READ=34695906 > 10/11/20 12:21:50 INFO mapred.JobClient: FILE_BYTES_WRITTEN=11751492 > 10/11/20 12:21:50 INFO mapred.JobClient: HDFS_BYTES_WRITTEN=17542312 > 10/11/20 12:21:50 INFO mapred.JobClient: Map-Reduce Framework > 10/11/20 12:21:50 INFO mapred.JobClient: Reduce input groups=0 > 10/11/20 12:21:50 INFO mapred.JobClient: Combine output records=0 > 10/11/20 12:21:50 INFO mapred.JobClient: Map input records=1000209 > 10/11/20 12:21:50 INFO mapred.JobClient: Reduce shuffle bytes=0 > 10/11/20 12:21:50 INFO mapred.JobClient: Reduce output records=0 > 10/11/20 12:21:50 INFO mapred.JobClient: Spilled Records=2000418 > 10/11/20 12:21:50 INFO mapred.JobClient: Map output bytes=1990807 > 10/11/20 12:21:50 INFO mapred.JobClient: Combine input records=0 > 10/11/20 12:21:50 INFO mapred.JobClient: Map output records=1000209 > 10/11/20 12:21:50 INFO mapred.JobClient: Reduce input records=0 > > > So is a problem about the class i think, well my command line is: > > ../hadoop/bin/hadoop jar core/target/mahout-core-0.5-SNAPSHOT.job.jar > org.apache.mahout.cf.taste.hadoop.pseudo.RecommenderJob -i input/ratings.txt > -o data/ratings4 --recommenderClassName > org.apache.mahout.cf.taste.impl.recommender.GenericItemBasedRecommender > > Thanks again > > Il giorno 20/nov/2010, alle ore 12.07, Sean Owen ha scritto: > > > Sorry but that's something to do with Hadoop, not Mahout. It seems like > an > > error in your HDFS cluster. > > > > On Sat, Nov 20, 2010 at 10:41 AM, Stefano Bellasio < > > [email protected]> wrote: > > > >> Ok Sean, thank you, works very well :) Now when i run hadoop with that > >> before finish it say this: > >> > >> > >
