public final class BlockComputation extends AbstractComputation
Constructor and Description |
---|
BlockComputation() |
Modifier and Type | Method and Description |
---|---|
void |
compute(Vertex vertex,
Iterable messages)
Must be defined by user to do computation on a single Vertex.
|
void |
postSuperstep()
Finish computation.
|
void |
preSuperstep()
Prepare for computation.
|
addEdgeRequest, addVertexRequest, addVertexRequest, getContext, getMyWorkerIndex, getSuperstep, getTotalNumEdges, getTotalNumVertices, getWorkerContext, getWorkerCount, getWorkerForVertex, initialize, removeEdgesRequest, removeVertexRequest, sendMessage, sendMessageToAllEdges, sendMessageToMultipleEdges
aggregate, getAggregatedValue, getBroadcast, reduce, reduceMerge, setWorkerGlobalCommUsage
getConf, setConf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConf
setConf
getBroadcast
reduce, reduceMerge
aggregate
getAggregatedValue
public void preSuperstep()
AbstractComputation
AbstractComputation.compute(Vertex, Iterable)
being called for any of the vertices
in the partition.preSuperstep
in interface Computation
preSuperstep
in class AbstractComputation
public void compute(Vertex vertex, Iterable messages) throws IOException
AbstractComputation
compute
in interface Computation
compute
in class AbstractComputation
vertex
- Vertexmessages
- Messages that were sent to this vertex in the previous
superstep. Each message is only guaranteed to have
a life expectancy as long as next() is not called.IOException
public void postSuperstep()
AbstractComputation
postSuperstep
in interface Computation
postSuperstep
in class AbstractComputation
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.