com.intel.hadoop.graphbuilder.partition.mapreduce.vrecord
Class VrecordIngressReducer
java.lang.Object
org.apache.hadoop.mapred.MapReduceBase
com.intel.hadoop.graphbuilder.partition.mapreduce.vrecord.VrecordIngressReducer
- All Implemented Interfaces:
- java.io.Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Reducer<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
public class VrecordIngressReducer
- extends org.apache.hadoop.mapred.MapReduceBase
- implements org.apache.hadoop.mapred.Reducer<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
This reducer class takes a list of VertexRecord
that belongs to the
same partition, and write them into the output directory of that partition.
It also computes meta information about the number of vertices in the
partition as well as the number of vertices that have this partition as the
owner.
$outputdir/partition{$i}/vrecord contains the vertex records of partition i,
and $outputdir/partition{$i}/meta has the meta information of partition i.
Method Summary |
void |
close()
|
void |
configure(org.apache.hadoop.mapred.JobConf job)
|
void |
reduce(org.apache.hadoop.io.IntWritable key,
java.util.Iterator<org.apache.hadoop.io.Text> value,
org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> out,
org.apache.hadoop.mapred.Reporter reporter)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VrecordIngressReducer
public VrecordIngressReducer()
configure
public void configure(org.apache.hadoop.mapred.JobConf job)
- Specified by:
configure
in interface org.apache.hadoop.mapred.JobConfigurable
- Overrides:
configure
in class org.apache.hadoop.mapred.MapReduceBase
reduce
public void reduce(org.apache.hadoop.io.IntWritable key,
java.util.Iterator<org.apache.hadoop.io.Text> value,
org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> out,
org.apache.hadoop.mapred.Reporter reporter)
throws java.io.IOException
- Specified by:
reduce
in interface org.apache.hadoop.mapred.Reducer<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class org.apache.hadoop.mapred.MapReduceBase
- Throws:
java.io.IOException