Graph Class
Abstract methods:
abstract def cache(): Graph[VD, ED]
Caches the vertices and edges associated with this graph at the previously-specified target storage levels, which default to MEMORY_ONLY.
abstract def checkpoint(): Unit
Mark this Graph for checkpointing.
abstract val edges: EdgeRDD[ED]
An RDD containing the edges and their associated attributes.
abstract def getCheckpointFiles: Seq[String]
Gets the name of the files to which this Graph was checkpointed.
abstract def groupEdges(merge: (ED, ED) β ED): Graph[VD, ED]
Merges multiple edges between two vertices into a single edge.
abstract def isCheckpointed: Boolean
Return whether this Graph has been checkpointed or not.
abstract def mapEdges[ED2](map: (PartitionID, Iterator[Edge[ED]]) β Iterator[ED2])(implicit arg0: ClassTag[ED2]): Graph[VD, ED2]
Transforms each edge attribute using the map function, passing it a whole partition at a time.
abstract def mapTriplets[ED2](map: (PartitionID, Iterator[EdgeTriplet[VD, ED]]) => Iterator[ED2], tripletFields: TripletFields)(implicit arg0: ClassTag[ED2]): Graph[VD, ED2]
Transforms each edge attribute a partition at a time using the map function, passing it the adjacent vertex attributes as well.
abstract def mapVertices[VD2](map: (VertexId, VD) => VD2)(implicit arg0: ClassTag[VD2], eq: =:=[VD, VD2] = null): Graph[VD2, ED]
Transforms each vertex attribute in the graph using the map function.
abstract def mask[VD2, ED2](other: Graph[VD2, ED2])(implicit arg0: ClassTag[VD2], arg1: ClassTag[ED2]): Graph[VD, ED]
Restricts the graph to only the vertices and edges that are also in other, but keeps the attributes from this graph.
abstract def outerJoinVertices[U, VD2](other: RDD[(VertexId, U)])(mapFunc: (VertexId, VD, Option[U]) β VD2)(implicit arg0: ClassTag[U], arg1: ClassTag[VD2], eq: =:=[VD, VD2] = null): Graph[VD2, ED]
Joins the vertices with entries in the table RDD and merges the results using mapFunc.
abstract def partitionBy(partitionStrategy: PartitionStrategy, numPartitions: Int): Graph[VD, ED]
Repartitions the edges in the graph according to partitionStrategy.
abstract def partitionBy(partitionStrategy: PartitionStrategy): Graph[VD, ED]
Repartitions the edges in the graph according to partitionStrategy.
abstract def persist(newLevel: StorageLevel = StorageLevel.MEMORY_ONLY): Graph[VD, ED]
Caches the vertices and edges associated with this graph at the specified storage level, ignoring any target storage levels previously set.
abstract reverse: def Graph[VD, ED]
Reverses all edges in the graph.
abstract def subgraph(epred: (EdgeTriplet[VD, ED]) β Boolean = x => true, vpred: (VertexId, VD) β Boolean = (v, d) => true): Graph[VD, ED]
Restricts the graph to only the vertices and edges satisfying the predicates.
abstract val triplets: RDD[EdgeTriplet[VD, ED]]
An RDD containing the edge triplets, which are edges along with the vertex data associated with the adjacent vertices.
abstract def unpersist(blocking: Boolean = true): Graph[VD, ED]
Uncaches both vertices and edges of this graph.
abstract def unpersistVertices (blocking: Boolean = true): Graph[VD, ED]
Uncaches only the vertices of this graph, leaving the edges alone.
abstract vertices val VertexRDD[VD]
An RDD containing the vertices and their associated attributes
Last updated