Class/Object

org.graphframes.lib

AggregateMessages

Related Docs: object AggregateMessages | package lib

Permalink

class AggregateMessages extends Arguments with Serializable

This is a primitive for implementing graph algorithms. This method aggregates messages from the neighboring edges and vertices of each vertex.

For each triplet (source vertex, edge, destination vertex) in GraphFrame.triplets, this can send a message to the source and/or destination vertices.

When specifying the messages and aggregation function, the user may reference columns using:

Note: If you use this operation to write an iterative algorithm, you may want to use getCachedDataFrame() as a workaround for caching issues.

Example:
  1. We can use this function to compute the in-degree of each vertex

    val g: GraphFrame = Graph.textFile("twittergraph")
    val inDeg: DataFrame =
      g.aggregateMessages().sendToDst(lit(1)).agg(sum(AggregateMessagesBuilder.msg))
Linear Supertypes
Serializable, Serializable, Arguments, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AggregateMessages
  2. Serializable
  3. Serializable
  4. Arguments
  5. AnyRef
  6. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from AggregateMessages to any2stringadd[AggregateMessages] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (AggregateMessages, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from AggregateMessages to ArrowAssoc[AggregateMessages] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def agg(aggCol: String): DataFrame

    Permalink

    Run the aggregation, specifying SQL expression as a String

    Run the aggregation, specifying SQL expression as a String

    See the overloaded method documentation for more details.

  7. def agg(aggCol: Column): DataFrame

    Permalink

    Run the aggregation, returning the resulting DataFrame of aggregated messages.

    Run the aggregation, returning the resulting DataFrame of aggregated messages. This is a lazy operation, so the DataFrame will not be materialized until an action is executed on it.

    This returns a DataFrame with schema:

    • column "id": vertex ID
    • aggCol: aggregate result If you need to join this with the original GraphFrame.vertices, you can run an inner join of the form:
    val g: GraphFrame = ...
    val aggResult = g.AggregateMessagesBuilder.sendToSrc(msg).agg(aggFunc)
    aggResult.join(g.vertices, ID)
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def ensuring(cond: (AggregateMessages) ⇒ Boolean, msg: ⇒ Any): AggregateMessages

    Permalink
    Implicit information
    This member is added by an implicit conversion from AggregateMessages to Ensuring[AggregateMessages] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (AggregateMessages) ⇒ Boolean): AggregateMessages

    Permalink
    Implicit information
    This member is added by an implicit conversion from AggregateMessages to Ensuring[AggregateMessages] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: ⇒ Any): AggregateMessages

    Permalink
    Implicit information
    This member is added by an implicit conversion from AggregateMessages to Ensuring[AggregateMessages] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): AggregateMessages

    Permalink
    Implicit information
    This member is added by an implicit conversion from AggregateMessages to Ensuring[AggregateMessages] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from AggregateMessages to StringFormat[AggregateMessages] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. def sendToDst(value: String): AggregateMessages.this.type

    Permalink

    Send message to destination vertex, specifying SQL expression as a String

  25. def sendToDst(value: Column): AggregateMessages.this.type

    Permalink

    Send message to destination vertex

  26. def sendToSrc(value: String): AggregateMessages.this.type

    Permalink

    Send message to source vertex, specifying SQL expression as a String

  27. def sendToSrc(value: Column): AggregateMessages.this.type

    Permalink

    Send message to source vertex

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. def [B](y: B): (AggregateMessages, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from AggregateMessages to ArrowAssoc[AggregateMessages] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Serializable

Inherited from Serializable

Inherited from Arguments

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from AggregateMessages to any2stringadd[AggregateMessages]

Inherited by implicit conversion StringFormat from AggregateMessages to StringFormat[AggregateMessages]

Inherited by implicit conversion Ensuring from AggregateMessages to Ensuring[AggregateMessages]

Inherited by implicit conversion ArrowAssoc from AggregateMessages to ArrowAssoc[AggregateMessages]

Ungrouped