gov.llnl.ontology.mapreduce.stats
Class WordCountSumReducer
java.lang.Object
org.apache.hadoop.mapreduce.Reducer<StringPair,org.apache.hadoop.io.IntWritable,StringPair,org.apache.hadoop.io.IntWritable>
gov.llnl.ontology.mapreduce.stats.WordCountSumReducer
public class WordCountSumReducer
- extends org.apache.hadoop.mapreduce.Reducer<StringPair,org.apache.hadoop.io.IntWritable,StringPair,org.apache.hadoop.io.IntWritable>
- Author:
- Keith Stevens
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer |
org.apache.hadoop.mapreduce.Reducer.Context |
Method Summary |
static void |
emitCounts(Map<String,StringCounter> wocCounts,
org.apache.hadoop.mapreduce.Mapper.Context context)
Writes the co-occurrence counts as stored in a map of Counter s to
context . |
void |
reduce(StringPair 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 |
WordCountSumReducer
public WordCountSumReducer()
emitCounts
public static void emitCounts(Map<String,StringCounter> wocCounts,
org.apache.hadoop.mapreduce.Mapper.Context context)
throws IOException,
InterruptedException
- Writes the co-occurrence counts as stored in a map of
Counter
s to
context
. This is simply a helper function that formats each
written co-occurrence in the format used by this Reducer
.
- Throws:
IOException
InterruptedException
reduce
public void reduce(StringPair 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<StringPair,org.apache.hadoop.io.IntWritable,StringPair,org.apache.hadoop.io.IntWritable>
- Throws:
IOException
InterruptedException
Copyright © 2010-2011. All Rights Reserved.