Interface GiraphMessageManager<OID_T extends org.apache.hadoop.io.WritableComparable,​VDATA_T extends org.apache.hadoop.io.Writable,​EDATA_T extends org.apache.hadoop.io.Writable,​IN_MSG_T extends org.apache.hadoop.io.Writable,​OUT_MSG_T extends org.apache.hadoop.io.Writable,​GS_VID_T,​GS_OID_T>

  • All Known Implementing Classes:
    AbstractMessageManager, GiraphMpiMessageManager, GiraphNettyMessageManager

    public interface GiraphMessageManager<OID_T extends org.apache.hadoop.io.WritableComparable,​VDATA_T extends org.apache.hadoop.io.Writable,​EDATA_T extends org.apache.hadoop.io.Writable,​IN_MSG_T extends org.apache.hadoop.io.Writable,​OUT_MSG_T extends org.apache.hadoop.io.Writable,​GS_VID_T,​GS_OID_T>
    • Method Detail

      • receiveMessages

        void receiveMessages()
        Called by our framework, to deserialize the messages from c++ to java. Must be called before getMessages
      • getMessages

        Iterable<IN_MSG_T> getMessages​(long lid)
        Get the messages received from last round.
        Parameters:
        lid - local id.
        Returns:
        received msg.
      • messageAvailable

        boolean messageAvailable​(long lid)
        Check any message available on this vertex.
        Parameters:
        lid - local id
        Returns:
        true if received messages.
      • sendMessage

        void sendMessage​(OID_T dstOid,
                         OUT_MSG_T message)
        Send one message to dstOid.
        Parameters:
        dstOid - vertex to receive this message.
        message - message.
      • sendMessageToAllEdges

        void sendMessageToAllEdges​(org.apache.giraph.graph.Vertex<OID_T,​VDATA_T,​EDATA_T> vertex,
                                   OUT_MSG_T message)
        Send msg to all neighbors of vertex.
        Parameters:
        vertex - querying vertex
        message - message to send.
      • finishMessageSending

        void finishMessageSending()
        Make sure all messages has been sent.
      • anyMessageReceived

        boolean anyMessageReceived()
        Check any messages received. For mpi-based message manager, we check any message to self produced. For netty-based message manager, we check any message received.
        Returns:
        true if any message received.
      • forceContinue

        void forceContinue()
      • preSuperstep

        void preSuperstep()
      • postSuperstep

        void postSuperstep()
      • postApplication

        void postApplication()