com.intel.hadoop.graphbuilder.idnormalize.mapreduce
Class TransEdgeMapper<VidType extends org.apache.hadoop.io.WritableComparable<VidType>>

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by com.intel.hadoop.graphbuilder.idnormalize.mapreduce.TransEdgeMapper<VidType>
Type Parameters:
VidType -
All Implemented Interfaces:
java.io.Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text>

public class TransEdgeMapper<VidType extends org.apache.hadoop.io.WritableComparable<VidType>>
extends org.apache.hadoop.mapred.MapReduceBase
implements org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text>

This mapper class maps each edge as (u,v,data) into (h(v), (D(u), v, data)) where D is the dictionary that contains entry u. Because the input is partitioned by the hash of source vertex, the number of dictionary loading is minimized.


Constructor Summary
TransEdgeMapper()
           
 
Method Summary
 void configure(org.apache.hadoop.mapred.JobConf conf)
           
 void map(org.apache.hadoop.io.LongWritable key, org.apache.hadoop.io.Text value, org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text> out, org.apache.hadoop.mapred.Reporter reporter)
           
 
Methods inherited from class org.apache.hadoop.mapred.MapReduceBase
close
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.Closeable
close
 

Constructor Detail

TransEdgeMapper

public TransEdgeMapper()
Method Detail

configure

public void configure(org.apache.hadoop.mapred.JobConf conf)
Specified by:
configure in interface org.apache.hadoop.mapred.JobConfigurable
Overrides:
configure in class org.apache.hadoop.mapred.MapReduceBase

map

public void map(org.apache.hadoop.io.LongWritable key,
                org.apache.hadoop.io.Text value,
                org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text> out,
                org.apache.hadoop.mapred.Reporter reporter)
         throws java.io.IOException
Specified by:
map in interface org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text>
Throws:
java.io.IOException