org.apache.giraph.graph
Class GraphMapper<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
java.lang.Object
org.apache.hadoop.mapreduce.Mapper<Object,Object,Object,Object>
org.apache.giraph.graph.GraphMapper<I,V,E>
- Type Parameters:
I - Vertex idV - Vertex dataE - Edge data
public class GraphMapper<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
- extends org.apache.hadoop.mapreduce.Mapper<Object,Object,Object,Object>
This mapper that will execute the BSP graph tasks alloted to this worker.
All tasks will be performed by calling the GraphTaskManager object managed by
this GraphMapper wrapper classs. Since this mapper will
not be passing data by key-value pairs through the MR framework, the
Mapper parameter types are irrelevant, and set to Object type.
| Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper |
org.apache.hadoop.mapreduce.Mapper.Context |
|
Method Summary |
void |
cleanup(org.apache.hadoop.mapreduce.Mapper.Context context)
|
void |
map(Object key,
Object value,
org.apache.hadoop.mapreduce.Mapper.Context context)
GraphMapper is designed to host the compute node in a Hadoop
Mapper task. |
void |
run(org.apache.hadoop.mapreduce.Mapper.Context context)
|
void |
setup(org.apache.hadoop.mapreduce.Mapper.Context context)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GraphMapper
public GraphMapper()
setup
public void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
throws IOException,
InterruptedException
- Overrides:
setup in class org.apache.hadoop.mapreduce.Mapper<Object,Object,Object,Object>
- Throws:
IOException
InterruptedException
map
public void map(Object key,
Object value,
org.apache.hadoop.mapreduce.Mapper.Context context)
throws IOException,
InterruptedException
- GraphMapper is designed to host the compute node in a Hadoop
Mapper task. The GraphTaskManager owned by GraphMapper manages all
framework-independent Giraph BSP operations for this job run.
- Overrides:
map in class org.apache.hadoop.mapreduce.Mapper<Object,Object,Object,Object>
- Parameters:
key - unused arg required by Mapper APIvalue - unused arg required by Mapper APIcontext - the Mapper#Context required to report progress
to the underlying cluster
- Throws:
IOException
InterruptedException
cleanup
public void cleanup(org.apache.hadoop.mapreduce.Mapper.Context context)
throws IOException,
InterruptedException
- Overrides:
cleanup in class org.apache.hadoop.mapreduce.Mapper<Object,Object,Object,Object>
- Throws:
IOException
InterruptedException
run
public void run(org.apache.hadoop.mapreduce.Mapper.Context context)
throws IOException,
InterruptedException
- Overrides:
run in class org.apache.hadoop.mapreduce.Mapper<Object,Object,Object,Object>
- Throws:
IOException
InterruptedException
Copyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.