org.apache.mahout.cf.taste.hadoop.similarity.item
Class CountUsersReducer
java.lang.Object
org.apache.hadoop.mapreduce.Reducer<CountUsersKeyWritable,VarLongWritable,VarIntWritable,org.apache.hadoop.io.NullWritable>
org.apache.mahout.cf.taste.hadoop.similarity.item.CountUsersReducer
public class CountUsersReducer
- extends org.apache.hadoop.mapreduce.Reducer<CountUsersKeyWritable,VarLongWritable,VarIntWritable,org.apache.hadoop.io.NullWritable>
counts all unique users, we ensure that we see userIDs sorted in ascending order via
secondary sort, so we don't have to buffer all of them
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer |
org.apache.hadoop.mapreduce.Reducer.Context |
Methods inherited from class org.apache.hadoop.mapreduce.Reducer |
cleanup, run, setup |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CountUsersReducer
public CountUsersReducer()
reduce
protected void reduce(CountUsersKeyWritable key,
Iterable<VarLongWritable> userIDs,
org.apache.hadoop.mapreduce.Reducer.Context context)
throws IOException,
InterruptedException
- Overrides:
reduce
in class org.apache.hadoop.mapreduce.Reducer<CountUsersKeyWritable,VarLongWritable,VarIntWritable,org.apache.hadoop.io.NullWritable>
- Throws:
IOException
InterruptedException
Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.