org.apache.giraph.examples
Class SimpleVertexWithWorkerContext.EmitterWorkerContext

java.lang.Object
  extended by org.apache.giraph.worker.WorkerContext
      extended by org.apache.giraph.examples.SimpleVertexWithWorkerContext.EmitterWorkerContext
All Implemented Interfaces:
AggregatorUsage, WorkerAggregatorUsage
Enclosing class:
SimpleVertexWithWorkerContext

public static class SimpleVertexWithWorkerContext.EmitterWorkerContext
extends WorkerContext

Example worker context to emit data as part of a superstep.


Constructor Summary
SimpleVertexWithWorkerContext.EmitterWorkerContext()
           
 
Method Summary
 void emit(String s)
          Write this string to the output stream.
 void postApplication()
          Finalize the WorkerContext.
 void postSuperstep()
          Execute user code.
 void preApplication()
          Initialize the WorkerContext.
 void preSuperstep()
          Execute user code.
 
Methods inherited from class org.apache.giraph.worker.WorkerContext
aggregate, getAggregatedValue, getContext, getSuperstep, getTotalNumEdges, getTotalNumVertices, setGraphState, setWorkerAggregatorUsage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleVertexWithWorkerContext.EmitterWorkerContext

public SimpleVertexWithWorkerContext.EmitterWorkerContext()
Method Detail

preApplication

public void preApplication()
Description copied from class: WorkerContext
Initialize the WorkerContext. This method is executed once on each Worker before the first superstep starts.

Specified by:
preApplication in class WorkerContext

postApplication

public void postApplication()
Description copied from class: WorkerContext
Finalize the WorkerContext. This method is executed once on each Worker after the last superstep ends.

Specified by:
postApplication in class WorkerContext

preSuperstep

public void preSuperstep()
Description copied from class: WorkerContext
Execute user code. This method is executed once on each Worker before each superstep starts.

Specified by:
preSuperstep in class WorkerContext

postSuperstep

public void postSuperstep()
Description copied from class: WorkerContext
Execute user code. This method is executed once on each Worker after each superstep ends.

Specified by:
postSuperstep in class WorkerContext

emit

public void emit(String s)
Write this string to the output stream.

Parameters:
s - String to dump.


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