org.apache.mahout.df.mapred.inmem
Class InMemMapper

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by org.apache.mahout.df.mapred.MapredMapper
          extended by org.apache.mahout.df.mapred.inmem.InMemMapper
All Implemented Interfaces:
java.io.Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.IntWritable,MapredOutput>

public class InMemMapper
extends MapredMapper
implements org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.IntWritable,MapredOutput>

In-memory mapper that grows the trees using a full copy of the data loaded in-memory. The number of trees to grow is determined by the current InMemInputSplit.


Constructor Summary
InMemMapper()
           
 
Method Summary
 void configure(org.apache.hadoop.mapred.JobConf conf)
           
protected  void initRandom(InMemInputFormat.InMemInputSplit split)
           
 void map(org.apache.hadoop.io.IntWritable key, org.apache.hadoop.io.NullWritable value, org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.IntWritable,MapredOutput> output, org.apache.hadoop.mapred.Reporter reporter)
           
 void map(org.apache.hadoop.io.IntWritable key, org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.IntWritable,MapredOutput> output, InMemInputFormat.InMemInputSplit split)
           
 
Methods inherited from class org.apache.mahout.df.mapred.MapredMapper
configure, getDataset, getTreeBuilder, isNoOutput, isOobEstimate
 
Methods inherited from class org.apache.hadoop.mapred.MapReduceBase
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.Closeable
close
 

Constructor Detail

InMemMapper

public InMemMapper()
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 MapredMapper

map

public void map(org.apache.hadoop.io.IntWritable key,
                org.apache.hadoop.io.NullWritable value,
                org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.IntWritable,MapredOutput> output,
                org.apache.hadoop.mapred.Reporter reporter)
         throws java.io.IOException
Specified by:
map in interface org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.IntWritable,MapredOutput>
Throws:
java.io.IOException

map

public void map(org.apache.hadoop.io.IntWritable key,
                org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.IntWritable,MapredOutput> output,
                InMemInputFormat.InMemInputSplit split)
         throws java.io.IOException
Throws:
java.io.IOException

initRandom

protected void initRandom(InMemInputFormat.InMemInputSplit split)


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