public class RecommenderSimilarityHadoopReducer
extends org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MATRIX_FILE_NAME
The name of the file to output the serialized matrix to
|
static java.lang.String |
SIM_RECOMMENDER_FILE_NAME
The name of the file to output the serialized item-based recommender to
|
static java.lang.String |
SIMILARITY_WRITE_PATH
Path at which to store the serialized similarity matrix and serialized
item-based recommender
|
| Constructor and Description |
|---|
RecommenderSimilarityHadoopReducer() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup(org.apache.hadoop.mapreduce.Reducer.Context context) |
void |
reduce(org.apache.hadoop.io.LongWritable key,
java.lang.Iterable<org.apache.hadoop.io.BytesWritable> values,
org.apache.hadoop.mapreduce.Reducer.Context context) |
void |
setup(org.apache.hadoop.mapreduce.Reducer.Context context) |
public static final java.lang.String SIMILARITY_WRITE_PATH
public static final java.lang.String MATRIX_FILE_NAME
public static final java.lang.String SIM_RECOMMENDER_FILE_NAME
public void setup(org.apache.hadoop.mapreduce.Reducer.Context context)
throws java.io.IOException
setup in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>java.io.IOExceptionpublic void reduce(org.apache.hadoop.io.LongWritable key,
java.lang.Iterable<org.apache.hadoop.io.BytesWritable> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
throws java.io.IOException
reduce in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>java.io.IOExceptionpublic void cleanup(org.apache.hadoop.mapreduce.Reducer.Context context)
throws java.io.IOException
cleanup in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>java.io.IOException