eu.dicodeproject.analysis.generic
Class GenericReducer

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text>
      extended by eu.dicodeproject.analysis.generic.GenericReducer

public class GenericReducer
extends org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text>

Sums up counts for words and writes the counts *-1 to HDFS. The counts are multiplied with -1 to get a descending sort order.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer
org.apache.hadoop.mapreduce.Reducer.Context
 
Constructor Summary
GenericReducer()
           
 
Method Summary
 void reduce(org.apache.hadoop.io.Text key, Iterable<org.apache.hadoop.io.IntWritable> values, org.apache.hadoop.mapreduce.Reducer.Context context)
           
 
Methods inherited from class org.apache.hadoop.mapreduce.Reducer
cleanup, run, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericReducer

public GenericReducer()
Method Detail

reduce

public void reduce(org.apache.hadoop.io.Text key,
                   Iterable<org.apache.hadoop.io.IntWritable> values,
                   org.apache.hadoop.mapreduce.Reducer.Context context)
            throws IOException,
                   InterruptedException
Overrides:
reduce in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text>
Throws:
IOException
InterruptedException


Copyright © 2011. All Rights Reserved.