org.apache.mahout.math.stats.entropy
Class KeyCounterMapper

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Writable,Object,org.apache.hadoop.io.Writable,VarIntWritable>
      extended by org.apache.mahout.math.stats.entropy.KeyCounterMapper

public final class KeyCounterMapper
extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Writable,Object,org.apache.hadoop.io.Writable,VarIntWritable>

Emits the key and the count of 1 as VarIntWritable.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context
 
Constructor Summary
KeyCounterMapper()
           
 
Method Summary
protected  void map(org.apache.hadoop.io.Writable key, Object 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

KeyCounterMapper

public KeyCounterMapper()
Method Detail

map

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


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