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, sendMessageToMultipleEdgesaggregate, getAggregatedValue, getBroadcast, reduce, reduceMerge, setWorkerGlobalCommUsagegetConf, setConfclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfsetConfgetBroadcastreduce, reduceMergeaggregategetAggregatedValuepublic 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
AbstractComputationcompute 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.IOExceptionpublic void preSuperstep()
AbstractComputationAbstractComputation.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()
AbstractComputationpostSuperstep 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.