com.intel.hadoop.graphbuilder.preprocess.mapreduce
Class CreateGraphMapper

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by com.intel.hadoop.graphbuilder.preprocess.mapreduce.CreateGraphMapper
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,VertexEdgeUnionType>

public class CreateGraphMapper
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,VertexEdgeUnionType>

The Mapper class parses each input value provided by the InputFormat, and outputs a list of Vertex and a list of Edge using a GraphTokenizer.


Constructor Summary
CreateGraphMapper()
           
 
Method Summary
 void configure(org.apache.hadoop.mapred.JobConf job)
           
 void map(org.apache.hadoop.io.LongWritable key, org.apache.hadoop.io.Text value, org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.IntWritable,VertexEdgeUnionType> out, org.apache.hadoop.mapred.Reporter arg3)
           
 
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

CreateGraphMapper

public CreateGraphMapper()
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

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,VertexEdgeUnionType> out,
                org.apache.hadoop.mapred.Reporter arg3)
         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,VertexEdgeUnionType>
Throws:
java.io.IOException