de.hpi.fgis.voidgen.hadoop.tasks.distinctclustering
Class TypeStatisticsReducer

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Reducer<StringIntPair,StringIntPair,org.apache.hadoop.io.Text,StringIntPair>
      extended by de.hpi.fgis.voidgen.hadoop.tasks.distinctclustering.TypeStatisticsReducer

public class TypeStatisticsReducer
extends org.apache.hadoop.mapreduce.Reducer<StringIntPair,StringIntPair,org.apache.hadoop.io.Text,StringIntPair>

Sums up all appearances of a type. For each subject of this type emits a pair of subject and a pair of type and type frequency. Emits only subjects, if the type appears more often than a specified threshold value.

Input

Output

Author:
Martin Linkhorst, Hasso Plattner Institute at University of Potsdam, Germany, Johannes Gosda, Hasso Plattner Institute at University of Potsdam, Germany

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

Field Detail

THRESHOLD

public static final java.lang.String THRESHOLD
Constructor Detail

TypeStatisticsReducer

public TypeStatisticsReducer()
Method Detail

setup

protected void setup(org.apache.hadoop.mapreduce.Reducer.Context context)
              throws java.lang.InterruptedException,
                     java.io.IOException
Overrides:
setup in class org.apache.hadoop.mapreduce.Reducer<StringIntPair,StringIntPair,org.apache.hadoop.io.Text,StringIntPair>
Throws:
java.lang.InterruptedException
java.io.IOException

reduce

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