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

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

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

For each subject selects the type which number of appearances is closest to the desired cluster size.

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
 
Constructor Summary
TypeSelectionReducer()
           
 
Method Summary
 void reduce(org.apache.hadoop.io.Text key, java.lang.Iterable<StringIntPair> values, org.apache.hadoop.mapreduce.Reducer.Context context)
           
 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
 

Constructor Detail

TypeSelectionReducer

public TypeSelectionReducer()
Method Detail

setup

public void setup(org.apache.hadoop.mapreduce.Reducer.Context context)
Overrides:
setup in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.Text,StringIntPair,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>

reduce

public void reduce(org.apache.hadoop.io.Text 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<org.apache.hadoop.io.Text,StringIntPair,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
Throws:
java.io.IOException
java.lang.InterruptedException