org.apache.mahout.math.hadoop.similarity
Class RowSimilarityJob.EntriesToVectorsReducer

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Reducer<SimilarityMatrixEntryKey,DistributedRowMatrix.MatrixEntryWritable,org.apache.hadoop.io.IntWritable,VectorWritable>
      extended by org.apache.mahout.math.hadoop.similarity.RowSimilarityJob.EntriesToVectorsReducer
Enclosing class:
RowSimilarityJob

public static class RowSimilarityJob.EntriesToVectorsReducer
extends org.apache.hadoop.mapreduce.Reducer<SimilarityMatrixEntryKey,DistributedRowMatrix.MatrixEntryWritable,org.apache.hadoop.io.IntWritable,VectorWritable>

collects all DistributedRowMatrix.MatrixEntryWritable for each column and creates a VectorWritable


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer
org.apache.hadoop.mapreduce.Reducer.Context
 
Constructor Summary
RowSimilarityJob.EntriesToVectorsReducer()
           
 
Method Summary
protected  void reduce(SimilarityMatrixEntryKey key, java.lang.Iterable<DistributedRowMatrix.MatrixEntryWritable> entries, org.apache.hadoop.mapreduce.Reducer.Context ctx)
           
protected  void setup(org.apache.hadoop.mapreduce.Reducer.Context ctx)
           
 
Methods inherited from class org.apache.hadoop.mapreduce.Reducer
cleanup, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowSimilarityJob.EntriesToVectorsReducer

public RowSimilarityJob.EntriesToVectorsReducer()
Method Detail

setup

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

reduce

protected void reduce(SimilarityMatrixEntryKey key,
                      java.lang.Iterable<DistributedRowMatrix.MatrixEntryWritable> entries,
                      org.apache.hadoop.mapreduce.Reducer.Context ctx)
               throws java.io.IOException,
                      java.lang.InterruptedException
Overrides:
reduce in class org.apache.hadoop.mapreduce.Reducer<SimilarityMatrixEntryKey,DistributedRowMatrix.MatrixEntryWritable,org.apache.hadoop.io.IntWritable,VectorWritable>
Throws:
java.io.IOException
java.lang.InterruptedException


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