public static class Finalization.LargeStarReducer extends org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.IntWritable,LongPairWritable,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.LongWritable>
Constructor and Description |
---|
LargeStarReducer() |
Modifier and Type | Method and Description |
---|---|
long |
find(long x)
the find function of the union-find algorithm.
|
protected void |
reduce(org.apache.hadoop.io.IntWritable key,
java.lang.Iterable<LongPairWritable> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
the reduce function.
|
void |
union(long x,
long y)
the union function of the union-find algorithm.
|
protected void reduce(org.apache.hadoop.io.IntWritable key, java.lang.Iterable<LongPairWritable> values, org.apache.hadoop.mapreduce.Reducer.Context context) throws java.io.IOException, java.lang.InterruptedException
reduce
in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.IntWritable,LongPairWritable,org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.LongWritable>
key
- the partition number. not used.values
- edgescontext
- of hadoopjava.io.IOException
- by hadoopjava.lang.InterruptedException
- by hadooppublic long find(long x)
x
- node to processpublic void union(long x, long y)
x
- a nodey
- another node