com.intel.hadoop.graphbuilder.partition.mapreduce.edge
Class EdgeIngressReducer<VidType extends org.apache.hadoop.io.WritableComparable<VidType>,VertexData extends org.apache.hadoop.io.Writable,EdgeData extends org.apache.hadoop.io.Writable,KeyType extends IngressKeyType<VidType>,ValueType extends IngressValueType<VidType,VertexData,EdgeData>>

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by com.intel.hadoop.graphbuilder.partition.mapreduce.edge.EdgeIngressReducer<VidType,VertexData,EdgeData,KeyType,ValueType>
Type Parameters:
VidType -
VertexData -
EdgeData -
KeyType -
ValueType -
All Implemented Interfaces:
java.io.Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Reducer<KeyType,ValueType,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>

public class EdgeIngressReducer<VidType extends org.apache.hadoop.io.WritableComparable<VidType>,VertexData extends org.apache.hadoop.io.Writable,EdgeData extends org.apache.hadoop.io.Writable,KeyType extends IngressKeyType<VidType>,ValueType extends IngressValueType<VidType,VertexData,EdgeData>>
extends org.apache.hadoop.mapred.MapReduceBase
implements org.apache.hadoop.mapred.Reducer<KeyType,ValueType,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>

This reduce task has 2 subroutines: edges are reduced into a Graph and vertices are reduced into VertexRecord. The reducer executes one of the 2 reduce methods based on the key type:

Output format and directory structures are determined by the choice of Graph and its corresponding GraphFormat and GraphOutput.

The current reducer uses SimpleSubGraph, SimpleJsonFormatter, and SimpleGraphOutput.

See Also:
SimpleSubGraph, SimpleGraph, SimpleJSONFormatter, SimpleGraphOutput

Constructor Summary
EdgeIngressReducer()
           
 
Method Summary
 void close()
           
 void configure(org.apache.hadoop.mapred.JobConf job)
           
 void reduce(KeyType key, java.util.Iterator<ValueType> iter, 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
 

Constructor Detail

EdgeIngressReducer

public EdgeIngressReducer()
Method Detail

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(KeyType key,
                   java.util.Iterator<ValueType> iter,
                   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<KeyType extends IngressKeyType<VidType>,ValueType extends IngressValueType<VidType,VertexData,EdgeData>,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