I
- Vertex id typeV
- Vertex value typeE
- Edge value typeM
- Message typepublic class SendMessagePiece<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable> extends Piece<I,V,E,M,Object>
AbstractPiece.InnerVertexReceiver, AbstractPiece.InnerVertexSender
MESSAGE_ENCODE_AND_STORE_TYPE_MIN_FORCE
Constructor and Description |
---|
SendMessagePiece(String name,
Class<M> messageClass,
SupplierFromVertex<I,V,E,M> messageSupplier,
SupplierFromVertex<I,V,E,Iterator<I>> targetsSupplier,
ConsumerWithVertex<I,V,E,Iterable<M>> messagesConsumer) |
Modifier and Type | Method and Description |
---|---|
Class<M> |
getMessageClass()
Override to specify type of the message this Piece sends, if it does
send messages.
|
VertexReceiver<I,V,E,M> |
getVertexReceiver(BlockWorkerReceiveApi<I> workerApi,
Object executionStage)
Override to do vertex receive processing.
|
VertexSender<I,V,E> |
getVertexSender(BlockWorkerSendApi<I,V,E,M> workerApi,
Object executionStage)
Override to do vertex send processing.
|
Block |
stripeByReceiver(int stripes,
Int2ObjFunction<Int2ObjFunction<Predicate<I>>> stripeSupplier)
Stripe message sending computation across multiple stripes, in
each stripe only part of the vertices will receive messages.
|
String |
toString() |
workerContextReceive, workerContextSend
allowOneMessageToManyIdsEncoding, getMessageClasses, getMessageCombiner, getMessageFactory, getWrappedVertexSender, receiveIgnoreExistingVertices, reduceDouble, reduceFloat, reduceInt, reduceLong, registerReducers, wrappedRegisterReducers
equals, forAllPossiblePieces, getPieceCount, hashCode, iterator, masterCompute, nextExecutionStage, registerAggregators
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public Block stripeByReceiver(int stripes, Int2ObjFunction<Int2ObjFunction<Predicate<I>>> stripeSupplier)
stripes
- Number of stripesstripeSupplier
- Stripe supplier function, if IDs are Longs, you can
use StripingUtils::fastHashStripingPredicatepublic VertexSender<I,V,E> getVertexSender(BlockWorkerSendApi<I,V,E,M> workerApi, Object executionStage)
DefaultParentPiece
getVertexSender
in class DefaultParentPiece<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable,Object,NoMessage,Object>
public VertexReceiver<I,V,E,M> getVertexReceiver(BlockWorkerReceiveApi<I> workerApi, Object executionStage)
AbstractPiece
getVertexReceiver
in class AbstractPiece<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable,Object,NoMessage,Object>
public Class<M> getMessageClass()
DefaultParentPiece
getMessageClass
in class DefaultParentPiece<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable,Object,NoMessage,Object>
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.