Class Traverse.TraverseContext
- java.lang.Object
-
- org.apache.giraph.conf.DefaultImmutableClassesGiraphConfigurable<I,V,E>
-
- org.apache.giraph.worker.WorkerAggregatorDelegator<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>
-
- org.apache.giraph.worker.WorkerContext
-
- com.alibaba.graphscope.example.giraph.Traverse.TraverseContext
-
- All Implemented Interfaces:
org.apache.giraph.aggregators.AggregatorUsage
,org.apache.giraph.conf.GiraphConfigurationSettable<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>
,org.apache.giraph.conf.ImmutableClassesGiraphConfigurable<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable,org.apache.hadoop.io.Writable>
,org.apache.giraph.worker.WorkerAggregatorUsage
,org.apache.giraph.worker.WorkerBroadcastUsage
,org.apache.giraph.worker.WorkerGlobalCommUsage
,org.apache.giraph.worker.WorkerIndexUsage<org.apache.hadoop.io.WritableComparable>
,org.apache.giraph.worker.WorkerReduceUsage
,org.apache.hadoop.io.Writable
- Enclosing class:
- Traverse
public static class Traverse.TraverseContext extends WorkerContext
-
-
Constructor Summary
Constructors Constructor Description TraverseContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, getAndClearMessagesFromOtherWorkers, getContext, getMyWorkerIndex, getSuperstep, getTotalNumEdges, getTotalNumVertices, getWorkerCount, getWorkerForVertex, incStep, logToCommandLine, readFields, reduce, reduceMerge, sendMessageToWorker, setAggregatorManager, setCurStep, setFragment, write
-
Methods inherited from class org.apache.giraph.worker.WorkerAggregatorDelegator
getBroadcast
-
-
-
-
Method Detail
-
preApplication
public void preApplication() throws InstantiationException, IllegalAccessException
Initialize the WorkerContext. This method is executed once on each Worker before the first superstep starts.- Specified by:
preApplication
in classWorkerContext
- Throws:
IllegalAccessException
- Thrown for getting the classInstantiationException
- Expected instantiation in this method.
-
postApplication
public void postApplication()
Finalize the WorkerContext. This method is executed once on each Worker after the last superstep ends.- Specified by:
postApplication
in classWorkerContext
-
preSuperstep
public void preSuperstep()
Execute user code. This method is executed once on each Worker before each superstep starts.- Specified by:
preSuperstep
in classWorkerContext
-
postSuperstep
public void postSuperstep()
Execute user code. This method is executed once on each Worker after each superstep ends.- Specified by:
postSuperstep
in classWorkerContext
-
-