I
- Vertex id typeV
- Vertex value typeE
- Edge value typeM
- Message typeWV
- Worker value typeWM
- Worker message typeS
- Execution stage typepublic abstract 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,WV,WM extends org.apache.hadoop.io.Writable,S> extends AbstractPiece<I,V,E,M,WV,WM,S>
AbstractPiece.InnerVertexReceiver, AbstractPiece.InnerVertexSender
Modifier and Type | Field and Description |
---|---|
static EnumConfOption<MessageEncodeAndStoreType> |
MESSAGE_ENCODE_AND_STORE_TYPE_MIN_FORCE
This option will tell which message encode & store enum to force,
when combining is not enabled.
|
Constructor and Description |
---|
DefaultParentPiece() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
allowOneMessageToManyIdsEncoding()
Override to specify that this Piece allows one to many ids encoding to be
used for messages.
|
protected Class<M> |
getMessageClass()
Override to specify type of the message this Piece sends, if it does
send messages.
|
MessageClasses<I,M> |
getMessageClasses(ImmutableClassesGiraphConfiguration conf)
Returns MessageClasses definition for messages being sent by this Piece.
|
protected MessageCombiner<? super I,M> |
getMessageCombiner(ImmutableClassesGiraphConfiguration conf)
Override to specify message combiner to be used, if any.
|
protected MessageValueFactory<M> |
getMessageFactory(ImmutableClassesGiraphConfiguration conf)
Override to specify message value factory to be used,
which creates objects into which messages will be deserialized.
|
VertexSender<I,V,E> |
getVertexSender(BlockWorkerSendApi<I,V,E,M> workerApi,
S executionStage)
Override to do vertex send processing.
|
AbstractPiece.InnerVertexSender |
getWrappedVertexSender(BlockWorkerSendApi<I,V,E,M> workerApi,
S executionStage)
Add automatic handling of reducers to getVertexSender.
|
protected boolean |
receiveIgnoreExistingVertices()
Override to specify that receive of this Piece (and send of next Piece)
ignore existing vertices, and just process received messages.
|
protected void |
reduceDouble(ReducerHandle<org.apache.hadoop.io.DoubleWritable,?> reduceHandle,
double value) |
protected void |
reduceFloat(ReducerHandle<org.apache.hadoop.io.FloatWritable,?> reduceHandle,
float value) |
protected void |
reduceInt(ReducerHandle<org.apache.hadoop.io.IntWritable,?> reduceHandle,
int value) |
protected void |
reduceLong(ReducerHandle<org.apache.hadoop.io.LongWritable,?> reduceHandle,
long value) |
void |
registerReducers(CreateReducersApi reduceApi,
S executionStage)
Override to register any potential reducers used by this piece,
through calls to
reduceApi , which will return reducer handles
for simple. |
void |
wrappedRegisterReducers(BlockMasterApi masterApi,
S executionStage)
Add automatic handling of reducers to registerReducers.
|
equals, forAllPossiblePieces, getPieceCount, getVertexReceiver, hashCode, iterator, masterCompute, nextExecutionStage, registerAggregators, toString, workerContextReceive, workerContextSend
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static final EnumConfOption<MessageEncodeAndStoreType> MESSAGE_ENCODE_AND_STORE_TYPE_MIN_FORCE
public void registerReducers(CreateReducersApi reduceApi, S executionStage)
reduceApi
, which will return reducer handles
for simple.
Tip: Without defining a field, first write here name of the field and what
you want to reduce, like:
totalSum = reduceApi.createLocalReducer(SumReduce.DOUBLE);
and then use tools your IDE provides to generate field signature itself,
which might be slightly complex:
ReducerHandle<DoubleWritable, DoubleWritable> totalSum;
public VertexSender<I,V,E> getVertexSender(BlockWorkerSendApi<I,V,E,M> workerApi, S executionStage)
protected Class<M> getMessageClass()
protected MessageValueFactory<M> getMessageFactory(ImmutableClassesGiraphConfiguration conf)
protected MessageCombiner<? super I,M> getMessageCombiner(ImmutableClassesGiraphConfiguration conf)
protected boolean allowOneMessageToManyIdsEncoding()
protected boolean receiveIgnoreExistingVertices()
public MessageClasses<I,M> getMessageClasses(ImmutableClassesGiraphConfiguration conf)
AbstractPiece
getMessageClasses
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,WV,WM extends org.apache.hadoop.io.Writable,S>
public final AbstractPiece.InnerVertexSender getWrappedVertexSender(BlockWorkerSendApi<I,V,E,M> workerApi, S executionStage)
AbstractPiece
getWrappedVertexSender
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,WV,WM extends org.apache.hadoop.io.Writable,S>
public final void wrappedRegisterReducers(BlockMasterApi masterApi, S executionStage)
AbstractPiece
wrappedRegisterReducers
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,WV,WM extends org.apache.hadoop.io.Writable,S>
protected final void reduceDouble(ReducerHandle<org.apache.hadoop.io.DoubleWritable,?> reduceHandle, double value)
protected final void reduceFloat(ReducerHandle<org.apache.hadoop.io.FloatWritable,?> reduceHandle, float value)
protected final void reduceLong(ReducerHandle<org.apache.hadoop.io.LongWritable,?> reduceHandle, long value)
protected final void reduceInt(ReducerHandle<org.apache.hadoop.io.IntWritable,?> reduceHandle, int value)
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.