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

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

public final class GroupAndCountByKeyAndValueMapper
extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,StringTuple,VarIntWritable>

Groups the input by key and value. Therefore it merges both to one key of type StringTuple and emits VarIntWritable(1) as value.


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

GroupAndCountByKeyAndValueMapper

public GroupAndCountByKeyAndValueMapper()
Method Detail

map

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


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