de.hpi.fgis.voidgen.hadoop.tasks.distinctclustering
Class TypeStatisticsReducer
java.lang.Object
org.apache.hadoop.mapreduce.Reducer<StringIntPair,StringIntPair,org.apache.hadoop.io.Text,StringIntPair>
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
- Key: pair of type and an integer defining the kind of the value
- Value: either a subject or a type count
Output
- Key: subject
- Value: pair of
a type and
the number of appearances of this type
- Author:
- Martin Linkhorst, Hasso Plattner Institute at University of Potsdam, Germany, Johannes Gosda, Hasso Plattner Institute at University of Potsdam, Germany
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer |
org.apache.hadoop.mapreduce.Reducer.Context |
Field Summary |
static java.lang.String |
THRESHOLD
|
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 |
THRESHOLD
public static final java.lang.String THRESHOLD
TypeStatisticsReducer
public TypeStatisticsReducer()
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