public class TestComputationStateComputation extends BasicComputation<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable,org.apache.hadoop.io.FloatWritable,org.apache.hadoop.io.DoubleWritable>
Modifier and Type | Class and Description |
---|---|
static class |
TestComputationStateComputation.TestComputationStateWorkerContext
WorkerContext for TestComputationState
|
Modifier and Type | Field and Description |
---|---|
static int |
NUM_COMPUTE_THREADS
How many compute threads to use in the test
|
static int |
NUM_PARTITIONS
How many partitions to have
|
static int |
NUM_VERTICES
How many vertices to create for the test
|
Constructor and Description |
---|
TestComputationStateComputation() |
Modifier and Type | Method and Description |
---|---|
void |
compute(Vertex<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable,org.apache.hadoop.io.FloatWritable> vertex,
Iterable<org.apache.hadoop.io.DoubleWritable> 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 static final int NUM_COMPUTE_THREADS
public static final int NUM_VERTICES
public static final int NUM_PARTITIONS
public void compute(Vertex<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable,org.apache.hadoop.io.FloatWritable> vertex, Iterable<org.apache.hadoop.io.DoubleWritable> messages) throws IOException
AbstractComputation
compute
in interface Computation<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable,org.apache.hadoop.io.FloatWritable,org.apache.hadoop.io.DoubleWritable,org.apache.hadoop.io.DoubleWritable>
compute
in class AbstractComputation<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable,org.apache.hadoop.io.FloatWritable,org.apache.hadoop.io.DoubleWritable,org.apache.hadoop.io.DoubleWritable>
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 preSuperstep()
AbstractComputation
AbstractComputation.compute(Vertex, Iterable)
being called for any of the vertices
in the partition.preSuperstep
in interface Computation<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable,org.apache.hadoop.io.FloatWritable,org.apache.hadoop.io.DoubleWritable,org.apache.hadoop.io.DoubleWritable>
preSuperstep
in class AbstractComputation<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable,org.apache.hadoop.io.FloatWritable,org.apache.hadoop.io.DoubleWritable,org.apache.hadoop.io.DoubleWritable>
public void postSuperstep()
AbstractComputation
postSuperstep
in interface Computation<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable,org.apache.hadoop.io.FloatWritable,org.apache.hadoop.io.DoubleWritable,org.apache.hadoop.io.DoubleWritable>
postSuperstep
in class AbstractComputation<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.DoubleWritable,org.apache.hadoop.io.FloatWritable,org.apache.hadoop.io.DoubleWritable,org.apache.hadoop.io.DoubleWritable>
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.