Object/Class

org.graphframes

GraphFrame

Related Docs: class GraphFrame | package graphframes

Permalink

object GraphFrame extends Serializable with Logging

Linear Supertypes
Logging, LazyLogging, com.typesafe.scalalogging.Logging, Serializable, Serializable, AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. GraphFrame
  2. Logging
  3. LazyLogging
  4. Logging
  5. Serializable
  6. Serializable
  7. AnyRef
  8. Any
  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. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val DST: String

    Permalink

    Column name for destination vertices of edges.

    Column name for destination vertices of edges.

  5. val EDGE: String

    Permalink

    Column name for edge in GraphFrame.triplets.

    Column name for edge in GraphFrame.triplets. In GraphFrame.triplets, this is a column of edges with schema matching GraphFrame.edges.

  6. val ID: String

    Permalink

    Column name for vertex IDs in GraphFrame.vertices

  7. val SRC: String

    Permalink

    Column name for source vertices of edges.

    Column name for source vertices of edges.

  8. def apply(vertices: DataFrame, edges: DataFrame): GraphFrame

    Permalink

    Create a new GraphFrame from vertex and edge DataFrames.

    Create a new GraphFrame from vertex and edge DataFrames.

    vertices

    Vertex DataFrame. This must include a column "id" containing unique vertex IDs. All other columns are treated as vertex attributes.

    edges

    Edge DataFrame. This must include columns "src" and "dst" containing source and destination vertex IDs. All other columns are treated as edge attributes.

    returns

    New GraphFrame instance

  9. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def fromEdges(e: DataFrame): GraphFrame

    Permalink

    Create a new GraphFrame from an edge DataFrame.

    Create a new GraphFrame from an edge DataFrame. The resulting GraphFrame will have GraphFrame.vertices with a single "id" column.

    Note: The GraphFrame.vertices DataFrame will be persisted at level StorageLevel.MEMORY_AND_DISK.

    e

    Edge DataFrame. This must include columns "src" and "dst" containing source and destination vertex IDs. All other columns are treated as edge attributes.

    returns

    New GraphFrame instance

  15. def fromGraphX[V, E](originalGraph: GraphFrame, graph: Graph[V, E], vertexNames: Seq[String] = Nil, edgeNames: Seq[String] = Nil)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[V], arg1: scala.reflect.api.JavaUniverse.TypeTag[E]): GraphFrame

    Permalink

    Given:

    Given:

    • a GraphFrame originalGraph
    • a GraphX graph derived from the GraphFrame using GraphFrame.toGraphX this method merges attributes from the GraphX graph into the original GraphFrame.

    This method is useful for doing computations using the GraphX API and then merging the results with a GraphFrame. For example, given:

    • GraphFrame originalGraph
    • GraphX Graph[String, Int] graph with a String vertex attribute we want to call "category" and an Int edge attribute we want to call "count" We can call fromGraphX(originalGraph, graph, Seq("category"), Seq("count")) to produce a new GraphFrame. The new GraphFrame will be an augmented version of originalGraph, with new GraphFrame.vertices column "category" and new GraphFrame.edges column "count" added.

    See org.graphframes.examples.BeliefPropagation for example usage.

    V

    the type of the vertex data

    E

    the type of the edge data

    originalGraph

    Original GraphFrame used to compute the GraphX graph.

    graph

    GraphX graph. Vertex and edge attributes, if any, will be merged into the original graph as new columns. If the attributes are Product types such as tuples, then each element of the Product will be put in a separate column. If the attributes are other types, then the entire GraphX attribute will become a single new column.

    vertexNames

    Column name(s) for vertex attributes in the GraphX graph. If there is no vertex attribute, this should be empty. If there is a singleton attribute, this should have a single column name. If the attribute is a Product type, this should be a list of names matching the order of the attribute elements.

    edgeNames

    Column name(s) for edge attributes in the GraphX graph. If there is no edge attribute, this should be empty. If there is a singleton attribute, this should have a single column name. If the attribute is a Product type, this should be a list of names matching the order of the attribute elements.

    returns

    original graph augmented with vertex and column attributes from the GraphX graph

  16. def fromGraphX[VD, ED](graph: Graph[VD, ED])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[VD], arg1: scala.reflect.api.JavaUniverse.TypeTag[ED]): GraphFrame

    Permalink

    Converts a GraphX Graph instance into a GraphFrame.

    Converts a GraphX Graph instance into a GraphFrame.

    This converts each org.apache.spark.rdd.RDD in the Graph to a DataFrame using schema inference.

    Vertex ID column names will be converted to "id" for the vertex DataFrame, and to "src" and "dst" for the edge DataFrame.

  17. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  20. def logDebug(s: String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  21. def logInfo(s: String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  22. def logTrace(s: String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  23. lazy val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    LazyLogging → Logging
  24. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  27. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Logging

Inherited from LazyLogging

Inherited from com.typesafe.scalalogging.Logging

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

conversions

Ungrouped