org.apache.mahout.math.hadoop
Class TimesSquaredJob.TimesSquaredMapper<T extends org.apache.hadoop.io.WritableComparable>

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by org.apache.mahout.math.hadoop.TimesSquaredJob.TimesSquaredMapper<T>
All Implemented Interfaces:
java.io.Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper<T,VectorWritable,org.apache.hadoop.io.NullWritable,VectorWritable>
Direct Known Subclasses:
TimesSquaredJob.TimesMapper
Enclosing class:
TimesSquaredJob

public static class TimesSquaredJob.TimesSquaredMapper<T extends org.apache.hadoop.io.WritableComparable>
extends org.apache.hadoop.mapred.MapReduceBase
implements org.apache.hadoop.mapred.Mapper<T,VectorWritable,org.apache.hadoop.io.NullWritable,VectorWritable>


Field Summary
protected  org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.NullWritable,VectorWritable> out
           
protected  Vector outputVector
           
 
Constructor Summary
TimesSquaredJob.TimesSquaredMapper()
           
 
Method Summary
 void close()
           
 void configure(org.apache.hadoop.mapred.JobConf conf)
           
 void map(T rowNum, VectorWritable v, org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.NullWritable,VectorWritable> out, org.apache.hadoop.mapred.Reporter rep)
           
protected  double scale(VectorWritable v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outputVector

protected Vector outputVector

out

protected org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.NullWritable,VectorWritable> out
Constructor Detail

TimesSquaredJob.TimesSquaredMapper

public TimesSquaredJob.TimesSquaredMapper()
Method Detail

configure

public void configure(org.apache.hadoop.mapred.JobConf conf)
Specified by:
configure in interface org.apache.hadoop.mapred.JobConfigurable
Overrides:
configure in class org.apache.hadoop.mapred.MapReduceBase

map

public void map(T rowNum,
                VectorWritable v,
                org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.NullWritable,VectorWritable> out,
                org.apache.hadoop.mapred.Reporter rep)
         throws java.io.IOException
Specified by:
map in interface org.apache.hadoop.mapred.Mapper<T extends org.apache.hadoop.io.WritableComparable,VectorWritable,org.apache.hadoop.io.NullWritable,VectorWritable>
Throws:
java.io.IOException

scale

protected double scale(VectorWritable v)

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class org.apache.hadoop.mapred.MapReduceBase
Throws:
java.io.IOException


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