org.apache.gora.examples.mapreduce
Class WordCount.TokenizerMapper

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Mapper<K1,V1,K2,V2>
      extended by org.apache.gora.mapreduce.GoraMapper<String,WebPage,org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable>
          extended by org.apache.gora.examples.mapreduce.WordCount.TokenizerMapper
Enclosing class:
WordCount

public static class WordCount.TokenizerMapper
extends GoraMapper<String,WebPage,org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable>

TokenizerMapper takes <String, WebPage> pairs as obtained from the input DataStore, and tokenizes the content via WebPage.getContent(). The tokens are emitted as <String, WebPage> pairs.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context
 
Constructor Summary
WordCount.TokenizerMapper()
           
 
Method Summary
protected  void map(String key, WebPage page, org.apache.hadoop.mapreduce.Mapper.Context context)
           
 
Methods inherited from class org.apache.gora.mapreduce.GoraMapper
initMapperJob, initMapperJob, initMapperJob, initMapperJob, initMapperJob
 
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

WordCount.TokenizerMapper

public WordCount.TokenizerMapper()
Method Detail

map

protected void map(String key,
                   WebPage page,
                   org.apache.hadoop.mapreduce.Mapper.Context context)
            throws IOException,
                   InterruptedException
Overrides:
map in class org.apache.hadoop.mapreduce.Mapper<String,WebPage,org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable>
Throws:
IOException
InterruptedException


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