I
- Vertex id typeV
- Vertex value typeE
- Edge value typeMPrev
- Previous piece message typeM
- Message typepublic final class MigrationPiece<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,MPrev extends org.apache.hadoop.io.Writable,M extends org.apache.hadoop.io.Writable> extends PieceWithWorkerContext<I,V,E,M,MigrationWorkerContext,org.apache.hadoop.io.Writable,MigrationSuperstepStage>
AbstractPiece.InnerVertexReceiver, AbstractPiece.InnerVertexSender
MESSAGE_ENCODE_AND_STORE_TYPE_MIN_FORCE
Modifier and Type | Method and Description |
---|---|
static <I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,MR extends org.apache.hadoop.io.Writable,MS extends org.apache.hadoop.io.Writable> |
createMigrationPiece(Class<? extends MigrationAbstractComputation<I,V,E,MR,MS>> computationClass,
MigrationMasterCompute masterCompute,
Supplier<Iterable<MR>> previousMessagesSupplier,
Consumer<Iterable<MS>> currentMessagesConsumer,
Class<MS> messageClass,
Class<? extends MessageCombiner<? super I,MS>> messageCombinerClass) |
MessageClasses<I,M> |
getMessageClasses(ImmutableClassesGiraphConfiguration conf)
Returns MessageClasses definition for messages being sent by this Piece.
|
MigrationPiece |
getNextPiece() |
VertexReceiver<I,V,E,M> |
getVertexReceiver(BlockWorkerReceiveApi<I> workerApi,
MigrationSuperstepStage executionStage)
Override to do vertex receive processing.
|
VertexSender<I,V,E> |
getVertexSender(BlockWorkerSendApi<I,V,E,M> workerApi,
MigrationSuperstepStage executionStage)
Override to do vertex send processing.
|
void |
masterCompute(BlockMasterApi masterApi,
MigrationSuperstepStage executionStage)
Function that is called on master, after send phase, before receive phase.
|
MigrationSuperstepStage |
nextExecutionStage(MigrationSuperstepStage executionStage)
Override to provide different next execution stage for
Pieces that come after it.
|
void |
registerAggregators(BlockMasterApi masterApi)
Override to register any potential aggregators used by this piece.
|
void |
workerContextReceive(BlockWorkerContextReceiveApi workerContextApi,
MigrationSuperstepStage executionStage,
MigrationWorkerContext workerValue,
List<org.apache.hadoop.io.Writable> workerMessages)
Override to have worker context receive computation.
|
void |
workerContextSend(BlockWorkerContextSendApi<I,org.apache.hadoop.io.Writable> workerContextApi,
MigrationSuperstepStage executionStage,
MigrationWorkerContext workerValue)
Override to have worker context send computation.
|
getWorkerValue
allowOneMessageToManyIdsEncoding, getMessageClass, getMessageCombiner, getMessageFactory, getWrappedVertexSender, receiveIgnoreExistingVertices, reduceDouble, reduceFloat, reduceInt, reduceLong, registerReducers, wrappedRegisterReducers
equals, forAllPossiblePieces, getPieceCount, hashCode, iterator, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static <I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable,MR extends org.apache.hadoop.io.Writable,MS extends org.apache.hadoop.io.Writable> MigrationPiece<I,V,E,MR,MS> createMigrationPiece(Class<? extends MigrationAbstractComputation<I,V,E,MR,MS>> computationClass, MigrationMasterCompute masterCompute, Supplier<Iterable<MR>> previousMessagesSupplier, Consumer<Iterable<MS>> currentMessagesConsumer, Class<MS> messageClass, Class<? extends MessageCombiner<? super I,MS>> messageCombinerClass)
public void registerAggregators(BlockMasterApi masterApi) throws InstantiationException, IllegalAccessException
AbstractPiece
registerAggregators
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,MigrationWorkerContext,org.apache.hadoop.io.Writable,MigrationSuperstepStage>
InstantiationException
IllegalAccessException
public VertexSender<I,V,E> getVertexSender(BlockWorkerSendApi<I,V,E,M> workerApi, MigrationSuperstepStage 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,MigrationWorkerContext,org.apache.hadoop.io.Writable,MigrationSuperstepStage>
public void workerContextSend(BlockWorkerContextSendApi<I,org.apache.hadoop.io.Writable> workerContextApi, MigrationSuperstepStage executionStage, MigrationWorkerContext workerValue)
AbstractPiece
workerContextSend
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,MigrationWorkerContext,org.apache.hadoop.io.Writable,MigrationSuperstepStage>
public void masterCompute(BlockMasterApi masterApi, MigrationSuperstepStage executionStage)
AbstractPiece
masterCompute
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,MigrationWorkerContext,org.apache.hadoop.io.Writable,MigrationSuperstepStage>
public void workerContextReceive(BlockWorkerContextReceiveApi workerContextApi, MigrationSuperstepStage executionStage, MigrationWorkerContext workerValue, List<org.apache.hadoop.io.Writable> workerMessages)
AbstractPiece
workerContextReceive
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,MigrationWorkerContext,org.apache.hadoop.io.Writable,MigrationSuperstepStage>
public VertexReceiver<I,V,E,M> getVertexReceiver(BlockWorkerReceiveApi<I> workerApi, MigrationSuperstepStage 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,MigrationWorkerContext,org.apache.hadoop.io.Writable,MigrationSuperstepStage>
public MessageClasses<I,M> getMessageClasses(ImmutableClassesGiraphConfiguration conf)
AbstractPiece
getMessageClasses
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,MigrationWorkerContext,org.apache.hadoop.io.Writable,MigrationSuperstepStage>
public MigrationSuperstepStage nextExecutionStage(MigrationSuperstepStage executionStage)
AbstractPiece
nextExecutionStage
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,MigrationWorkerContext,org.apache.hadoop.io.Writable,MigrationSuperstepStage>
public MigrationPiece getNextPiece()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.