org.apache.mahout.cf.taste.hadoop.item
Class SimilarityMatrixRowWrapperMapper

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.IntWritable,VectorWritable,VarIntWritable,VectorOrPrefWritable>
      extended by org.apache.mahout.cf.taste.hadoop.item.SimilarityMatrixRowWrapperMapper

public final class SimilarityMatrixRowWrapperMapper
extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.IntWritable,VectorWritable,VarIntWritable,VectorOrPrefWritable>

maps a row of the similarity matrix to a VectorOrPrefWritable actually a column from that matrix has to be used but as the similarity matrix is symmetric, we can use a row instead of having to transpose it


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context
 
Constructor Summary
SimilarityMatrixRowWrapperMapper()
           
 
Method Summary
protected  void map(org.apache.hadoop.io.IntWritable key, VectorWritable value, org.apache.hadoop.mapreduce.Mapper.Context context)
           
 
Methods inherited from class org.apache.hadoop.mapreduce.Mapper
cleanup, run, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimilarityMatrixRowWrapperMapper

public SimilarityMatrixRowWrapperMapper()
Method Detail

map

protected void map(org.apache.hadoop.io.IntWritable key,
                   VectorWritable value,
                   org.apache.hadoop.mapreduce.Mapper.Context context)
            throws IOException,
                   InterruptedException
Overrides:
map in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.IntWritable,VectorWritable,VarIntWritable,VectorOrPrefWritable>
Throws:
IOException
InterruptedException


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.