org.apache.giraph.examples
Class SimpleVertexWithWorkerContext

java.lang.Object
  extended by org.apache.giraph.examples.SimpleVertexWithWorkerContext
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

public class SimpleVertexWithWorkerContext
extends Object
implements org.apache.hadoop.util.Tool

Fully runnable example of how to emit worker data to HDFS during a graph computation.


Nested Class Summary
static class SimpleVertexWithWorkerContext.EmitterWorkerContext
          Example worker context to emit data as part of a superstep.
static class SimpleVertexWithWorkerContext.SimpleComputation
          Actual vetex implementation
 
Field Summary
static String OUTPUTDIR
          Directory name of where to write.
 
Constructor Summary
SimpleVertexWithWorkerContext()
           
 
Method Summary
 org.apache.hadoop.conf.Configuration getConf()
           
static void main(String[] args)
          Executable from the command line.
 int run(String[] args)
           
 void setConf(org.apache.hadoop.conf.Configuration conf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUTPUTDIR

public static final String OUTPUTDIR
Directory name of where to write.

See Also:
Constant Field Values
Constructor Detail

SimpleVertexWithWorkerContext

public SimpleVertexWithWorkerContext()
Method Detail

setConf

public void setConf(org.apache.hadoop.conf.Configuration conf)
Specified by:
setConf in interface org.apache.hadoop.conf.Configurable

getConf

public org.apache.hadoop.conf.Configuration getConf()
Specified by:
getConf in interface org.apache.hadoop.conf.Configurable

run

public int run(String[] args)
        throws Exception
Specified by:
run in interface org.apache.hadoop.util.Tool
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Executable from the command line.

Parameters:
args - Command line arguments.
Throws:
Exception


Copyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.