public class SuperstepClasses extends Object implements org.apache.hadoop.io.Writable
Constructor and Description |
---|
SuperstepClasses(ImmutableClassesGiraphConfiguration conf,
Class<? extends Computation> computationClass,
MessageClasses<? extends org.apache.hadoop.io.WritableComparable,? extends org.apache.hadoop.io.Writable> incomingMessageClasses,
MessageClasses<? extends org.apache.hadoop.io.WritableComparable,? extends org.apache.hadoop.io.Writable> outgoingMessageClasses)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static SuperstepClasses |
createAndExtractTypes(ImmutableClassesGiraphConfiguration conf)
Create superstep classes by initiazling from current state
in configuration
|
static SuperstepClasses |
createToRead(ImmutableClassesGiraphConfiguration conf)
Create empty superstep classes, readFields needs to be called afterwards
|
Class<? extends Computation> |
getComputationClass() |
Class<? extends MessageCombiner> |
getMessageCombinerClass()
Get message combiner class
|
MessageClasses<? extends org.apache.hadoop.io.WritableComparable,? extends org.apache.hadoop.io.Writable> |
getOutgoingMessageClasses() |
void |
readFields(DataInput input) |
void |
setComputationClass(Class<? extends Computation> computationClass)
Set computation class
|
void |
setIncomingMessageClass(Class<? extends org.apache.hadoop.io.Writable> incomingMessageClass)
Deprecated.
|
void |
setMessageCombinerClass(Class<? extends MessageCombiner> messageCombinerClass)
Set message combiner class.
|
void |
setOutgoingMessageClass(Class<? extends org.apache.hadoop.io.Writable> outgoingMessageClass)
Set outgoing message class.
|
void |
setOutgoingMessageClasses(MessageClasses<? extends org.apache.hadoop.io.WritableComparable,? extends org.apache.hadoop.io.Writable> outgoingMessageClasses)
Set's outgoing MessageClasses for next superstep.
|
String |
toString() |
void |
updateGiraphClasses(GiraphClasses classes)
Update GiraphClasses with updated types
|
void |
verifyTypesMatch(boolean checkMatchingMesssageTypes)
Verify that types of current Computation and MessageCombiner are valid.
|
void |
write(DataOutput output) |
public SuperstepClasses(ImmutableClassesGiraphConfiguration conf, Class<? extends Computation> computationClass, MessageClasses<? extends org.apache.hadoop.io.WritableComparable,? extends org.apache.hadoop.io.Writable> incomingMessageClasses, MessageClasses<? extends org.apache.hadoop.io.WritableComparable,? extends org.apache.hadoop.io.Writable> outgoingMessageClasses)
conf
- ConfigurationcomputationClass
- computation classincomingMessageClasses
- incoming message classesoutgoingMessageClasses
- outgoing message classespublic static SuperstepClasses createToRead(ImmutableClassesGiraphConfiguration conf)
conf
- Configurationpublic static SuperstepClasses createAndExtractTypes(ImmutableClassesGiraphConfiguration conf)
conf
- Configurationpublic Class<? extends Computation> getComputationClass()
public MessageClasses<? extends org.apache.hadoop.io.WritableComparable,? extends org.apache.hadoop.io.Writable> getOutgoingMessageClasses()
public void setOutgoingMessageClasses(MessageClasses<? extends org.apache.hadoop.io.WritableComparable,? extends org.apache.hadoop.io.Writable> outgoingMessageClasses)
outgoingMessageClasses
- outgoing message classespublic void setComputationClass(Class<? extends Computation> computationClass)
computationClass
- computation classpublic void setMessageCombinerClass(Class<? extends MessageCombiner> messageCombinerClass)
messageCombinerClass
- message combiner class@Deprecated public void setIncomingMessageClass(Class<? extends org.apache.hadoop.io.Writable> incomingMessageClass)
incomingMessageClass
- incoming message classpublic void setOutgoingMessageClass(Class<? extends org.apache.hadoop.io.Writable> outgoingMessageClass)
outgoingMessageClass
- outgoing message classpublic Class<? extends MessageCombiner> getMessageCombinerClass()
public void verifyTypesMatch(boolean checkMatchingMesssageTypes)
IllegalStateException
will be thrown.checkMatchingMesssageTypes
- Check that the incoming/outgoing
message types matchpublic void updateGiraphClasses(GiraphClasses classes)
classes
- Giraph classespublic void write(DataOutput output) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput input) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.