Package mia.recommender.ch06

Source Code of mia.recommender.ch06.CooccurrenceColumnWrapperMapper

/*
* Source code for Listing 6.5
*
*/
package mia.recommender.ch06;

import java.io.IOException;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.mahout.cf.taste.hadoop.item.VectorOrPrefWritable;
import org.apache.mahout.math.VectorWritable;

public class CooccurrenceColumnWrapperMapper extends
    Mapper<IntWritable, VectorWritable, IntWritable, VectorOrPrefWritable> {

  public void map(IntWritable key, VectorWritable value, Context context)
      throws IOException, InterruptedException {
    context.write(key, new VectorOrPrefWritable(value.get()));
  }
}
TOP

Related Classes of mia.recommender.ch06.CooccurrenceColumnWrapperMapper

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.