org.apache.mahout.cf.taste.hadoop.pseudo
Class RecommenderReducer

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by org.apache.mahout.cf.taste.hadoop.pseudo.RecommenderReducer
All Implemented Interfaces:
java.io.Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Reducer<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.LongWritable,RecommendedItemsWritable>

public final class RecommenderReducer
extends org.apache.hadoop.mapred.MapReduceBase
implements org.apache.hadoop.mapred.Reducer<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.LongWritable,RecommendedItemsWritable>

The Reducer which takes as input the user IDs parsed out by the map phase, and for each unique user ID, computes recommendations with the configured Recommender. The results are output as RecommendedItemsWritable.

See Also:
RecommenderJob

Constructor Summary
RecommenderReducer()
           
 
Method Summary
 void configure(org.apache.hadoop.mapred.JobConf jobConf)
           
 void reduce(org.apache.hadoop.io.LongWritable key, java.util.Iterator<org.apache.hadoop.io.NullWritable> values, org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.LongWritable,RecommendedItemsWritable> output, org.apache.hadoop.mapred.Reporter reporter)
           
 
Methods inherited from class org.apache.hadoop.mapred.MapReduceBase
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.Closeable
close
 

Constructor Detail

RecommenderReducer

public RecommenderReducer()
Method Detail

configure

public void configure(org.apache.hadoop.mapred.JobConf jobConf)
Specified by:
configure in interface org.apache.hadoop.mapred.JobConfigurable
Overrides:
configure in class org.apache.hadoop.mapred.MapReduceBase

reduce

public void reduce(org.apache.hadoop.io.LongWritable key,
                   java.util.Iterator<org.apache.hadoop.io.NullWritable> values,
                   org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.LongWritable,RecommendedItemsWritable> output,
                   org.apache.hadoop.mapred.Reporter reporter)
            throws java.io.IOException
Specified by:
reduce in interface org.apache.hadoop.mapred.Reducer<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.LongWritable,RecommendedItemsWritable>
Throws:
java.io.IOException


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.