org.apache.mahout.cf.taste.hadoop
Class MaybePruneRowsMapper

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Mapper<VarLongWritable,VectorWritable,org.apache.hadoop.io.IntWritable,DistributedRowMatrix.MatrixEntryWritable>
      extended by org.apache.mahout.cf.taste.hadoop.MaybePruneRowsMapper

public class MaybePruneRowsMapper
extends org.apache.hadoop.mapreduce.Mapper<VarLongWritable,VectorWritable,org.apache.hadoop.io.IntWritable,DistributedRowMatrix.MatrixEntryWritable>

tries to limit the number of elements per col to a fixed size and transposes the input afterwards


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context
 
Field Summary
static java.lang.String MAX_COOCCURRENCES
           
 
Constructor Summary
MaybePruneRowsMapper()
           
 
Method Summary
protected  void map(VarLongWritable rowIndex, VectorWritable vectorWritable, org.apache.hadoop.mapreduce.Mapper.Context ctx)
           
protected  void setup(org.apache.hadoop.mapreduce.Mapper.Context ctx)
           
 
Methods inherited from class org.apache.hadoop.mapreduce.Mapper
cleanup, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_COOCCURRENCES

public static final java.lang.String MAX_COOCCURRENCES
Constructor Detail

MaybePruneRowsMapper

public MaybePruneRowsMapper()
Method Detail

setup

protected void setup(org.apache.hadoop.mapreduce.Mapper.Context ctx)
              throws java.io.IOException,
                     java.lang.InterruptedException
Overrides:
setup in class org.apache.hadoop.mapreduce.Mapper<VarLongWritable,VectorWritable,org.apache.hadoop.io.IntWritable,DistributedRowMatrix.MatrixEntryWritable>
Throws:
java.io.IOException
java.lang.InterruptedException

map

protected void map(VarLongWritable rowIndex,
                   VectorWritable vectorWritable,
                   org.apache.hadoop.mapreduce.Mapper.Context ctx)
            throws java.io.IOException,
                   java.lang.InterruptedException
Overrides:
map in class org.apache.hadoop.mapreduce.Mapper<VarLongWritable,VectorWritable,org.apache.hadoop.io.IntWritable,DistributedRowMatrix.MatrixEntryWritable>
Throws:
java.io.IOException
java.lang.InterruptedException


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.