org.apache.hadoop.examples
Class WordStandardDeviation.WordStandardDeviationReducer

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.LongWritable>
      extended by org.apache.hadoop.examples.WordStandardDeviation.WordStandardDeviationReducer
Enclosing class:
WordStandardDeviation

public static class WordStandardDeviation.WordStandardDeviationReducer
extends org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.LongWritable>

Performs integer summation of all the values for each key.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer
org.apache.hadoop.mapreduce.Reducer.Context
 
Constructor Summary
WordStandardDeviation.WordStandardDeviationReducer()
           
 
Method Summary
 void reduce(org.apache.hadoop.io.Text key, Iterable<org.apache.hadoop.io.LongWritable> values, org.apache.hadoop.mapreduce.Reducer.Context context)
          Sums all the individual values within the iterator and writes them to the same key.
 
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

WordStandardDeviation.WordStandardDeviationReducer

public WordStandardDeviation.WordStandardDeviationReducer()
Method Detail

reduce

public void reduce(org.apache.hadoop.io.Text key,
                   Iterable<org.apache.hadoop.io.LongWritable> values,
                   org.apache.hadoop.mapreduce.Reducer.Context context)
            throws IOException,
                   InterruptedException
Sums all the individual values within the iterator and writes them to the same key.

Overrides:
reduce in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.LongWritable>
Parameters:
key - This will be one of 2 constants: LENGTH_STR, COUNT_STR, or SQUARE_STR.
values - This will be an iterator of all the values associated with that key.
Throws:
IOException
InterruptedException


Copyright © 2013 Apache Software Foundation. All Rights Reserved.