org.apache.mahout.cf.taste.hadoop.pseudo
Class RecommenderReducer
java.lang.Object
org.apache.hadoop.mapreduce.Reducer<VarLongWritable,org.apache.hadoop.io.NullWritable,VarLongWritable,RecommendedItemsWritable>
org.apache.mahout.cf.taste.hadoop.pseudo.RecommenderReducer
public final class RecommenderReducer
- extends org.apache.hadoop.mapreduce.Reducer<VarLongWritable,org.apache.hadoop.io.NullWritable,VarLongWritable,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
| Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer |
org.apache.hadoop.mapreduce.Reducer.Context |
|
Method Summary |
protected void |
reduce(VarLongWritable key,
Iterable<org.apache.hadoop.io.NullWritable> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
|
protected void |
setup(org.apache.hadoop.mapreduce.Reducer.Context context)
|
| Methods inherited from class org.apache.hadoop.mapreduce.Reducer |
cleanup, run |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RecommenderReducer
public RecommenderReducer()
setup
protected void setup(org.apache.hadoop.mapreduce.Reducer.Context context)
throws IOException
- Overrides:
setup in class org.apache.hadoop.mapreduce.Reducer<VarLongWritable,org.apache.hadoop.io.NullWritable,VarLongWritable,RecommendedItemsWritable>
- Throws:
IOException
reduce
protected void reduce(VarLongWritable key,
Iterable<org.apache.hadoop.io.NullWritable> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
throws IOException,
InterruptedException
- Overrides:
reduce in class org.apache.hadoop.mapreduce.Reducer<VarLongWritable,org.apache.hadoop.io.NullWritable,VarLongWritable,RecommendedItemsWritable>
- Throws:
IOException
InterruptedException
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.