I
- Vertex id typeM
- Message typepublic class DefaultMessageClasses<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable> extends Object implements MessageClasses<I,M>
Constructor and Description |
---|
DefaultMessageClasses()
Constructor
|
DefaultMessageClasses(Class<M> messageClass,
Class<? extends MessageValueFactory<M>> messageValueFactoryClass,
Class<? extends MessageCombiner<? super I,M>> messageCombinerClass,
MessageEncodeAndStoreType messageEncodeAndStoreType)
Constructor
|
Modifier and Type | Method and Description |
---|---|
MessageClasses<I,M> |
createCopyForNewSuperstep()
Creates a fresh copy of this object,
to be used and changed for new superstep.
|
MessageCombiner<? super I,M> |
createMessageCombiner(ImmutableClassesGiraphConfiguration conf)
Create new instance of MessageCombiner
|
MessageValueFactory<M> |
createMessageValueFactory(ImmutableClassesGiraphConfiguration conf)
Create new instance of MessageValueFactory
|
Class<M> |
getMessageClass()
Get message class
|
MessageEncodeAndStoreType |
getMessageEncodeAndStoreType()
Get MessageEncodeAndStoreType
|
boolean |
ignoreExistingVertices()
Whether to completely ignore existing vertices,
and just process messages
|
void |
readFields(DataInput in) |
void |
setIfNotModifiedMessageClass(Class<M> messageClass)
Set message class if not set already in this superstep
|
void |
setMessageClass(Class<M> messageClass)
Set message class
|
void |
setMessageCombinerClass(Class<? extends MessageCombiner<? super I,M>> messageCombinerClass) |
void |
setMessageEncodeAndStoreType(MessageEncodeAndStoreType messageEncodeAndStoreType) |
void |
setMessageValueFactoryClass(Class<? extends MessageValueFactory<M>> messageValueFactoryClass) |
boolean |
useMessageCombiner()
Has message combiner been specified
|
void |
verifyConsistent(ImmutableClassesGiraphConfiguration conf)
Verify if types are internally consistent
|
void |
write(DataOutput out) |
public DefaultMessageClasses()
public DefaultMessageClasses(Class<M> messageClass, Class<? extends MessageValueFactory<M>> messageValueFactoryClass, Class<? extends MessageCombiner<? super I,M>> messageCombinerClass, MessageEncodeAndStoreType messageEncodeAndStoreType)
messageClass
- message classmessageValueFactoryClass
- message value factory classmessageCombinerClass
- message combiner classmessageEncodeAndStoreType
- message encode and store typepublic Class<M> getMessageClass()
MessageClasses
getMessageClass
in interface MessageClasses<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>
public MessageValueFactory<M> createMessageValueFactory(ImmutableClassesGiraphConfiguration conf)
MessageClasses
createMessageValueFactory
in interface MessageClasses<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>
conf
- Configurationpublic MessageCombiner<? super I,M> createMessageCombiner(ImmutableClassesGiraphConfiguration conf)
MessageClasses
createMessageCombiner
in interface MessageClasses<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>
conf
- Configurationpublic boolean useMessageCombiner()
MessageClasses
useMessageCombiner
in interface MessageClasses<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>
public boolean ignoreExistingVertices()
MessageClasses
ignoreExistingVertices
in interface MessageClasses<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>
public MessageEncodeAndStoreType getMessageEncodeAndStoreType()
MessageClasses
getMessageEncodeAndStoreType
in interface MessageClasses<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>
public MessageClasses<I,M> createCopyForNewSuperstep()
MessageClasses
createCopyForNewSuperstep
in interface MessageClasses<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>
public void verifyConsistent(ImmutableClassesGiraphConfiguration conf)
MessageClasses
verifyConsistent
in interface MessageClasses<I extends org.apache.hadoop.io.WritableComparable,M extends org.apache.hadoop.io.Writable>
conf
- Configurationpublic void setMessageClass(Class<M> messageClass)
messageClass
- message classspublic void setIfNotModifiedMessageClass(Class<M> messageClass)
messageClass
- message classpublic void setMessageCombinerClass(Class<? extends MessageCombiner<? super I,M>> messageCombinerClass)
public void setMessageValueFactoryClass(Class<? extends MessageValueFactory<M>> messageValueFactoryClass)
public void setMessageEncodeAndStoreType(MessageEncodeAndStoreType messageEncodeAndStoreType)
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.