de.hpi.fgis.voidgen.hadoop.tasks.clusterinformation
Class ClusterInfoStep1Reducer
java.lang.Object
org.apache.hadoop.mapreduce.Reducer<StringStringPair,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,SPCntTriple>
de.hpi.fgis.voidgen.hadoop.tasks.clusterinformation.ClusterInfoStep1Reducer
public class ClusterInfoStep1Reducer
- extends org.apache.hadoop.mapreduce.Reducer<StringStringPair,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,SPCntTriple>
Collects all subject-predicate pairs of a cluster (key)
and adds to every subject-predicate pair
the number of subjects using this predicate in the given cluster.
Input
- Key: a pair of
a cluster identifier
and the predicate of a quadruple
- Value: the subject of this quadruple.
Output (for each subject value)
- Key: the cluster identifier (taken from input key)
- Value: a triple containing of
- the subject
- the predicate (from input key)
- the number of subjects within the given cluster sharing the given predicate
- Author:
- Dandy Fenz, Hasso Plattner Institute at University of Potsdam, Germany, Matthias Pohl, 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 |
Method Summary |
void |
reduce(StringStringPair key,
java.lang.Iterable<org.apache.hadoop.io.Text> 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 |
ClusterInfoStep1Reducer
public ClusterInfoStep1Reducer()
setup
public void setup(org.apache.hadoop.mapreduce.Reducer.Context context)
- Overrides:
setup
in class org.apache.hadoop.mapreduce.Reducer<StringStringPair,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,SPCntTriple>
reduce
public void reduce(StringStringPair key,
java.lang.Iterable<org.apache.hadoop.io.Text> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
throws java.io.IOException,
java.lang.InterruptedException
- Overrides:
reduce
in class org.apache.hadoop.mapreduce.Reducer<StringStringPair,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,SPCntTriple>
- Throws:
java.io.IOException
java.lang.InterruptedException