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,
java.lang.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)
- Overrides:
setup
in class org.apache.hadoop.mapreduce.Reducer<VarLongWritable,org.apache.hadoop.io.NullWritable,VarLongWritable,RecommendedItemsWritable>
reduce
protected void reduce(VarLongWritable key,
java.lang.Iterable<org.apache.hadoop.io.NullWritable> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
throws java.io.IOException,
java.lang.InterruptedException
- Overrides:
reduce
in class org.apache.hadoop.mapreduce.Reducer<VarLongWritable,org.apache.hadoop.io.NullWritable,VarLongWritable,RecommendedItemsWritable>
- Throws:
java.io.IOException
java.lang.InterruptedException
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.