Aggregates vertices in messages
that have the same ids using reduceFunc
, returning a
VertexRDD co-indexed with this
.
Aggregates vertices in messages
that have the same ids using reduceFunc
, returning a
VertexRDD co-indexed with this
.
an RDD containing messages to aggregate, where each message is a pair of its target vertex ID and the message data
the associative aggregation function for merging messages to the same vertex
a VertexRDD co-indexed with this
, containing only vertices that received messages.
For those vertices, their values are the result of applying reduceFunc
to all received
messages.
Persist this RDD with the default storage level (MEMORY_ONLY
).
Persist this RDD with the default storage level (MEMORY_ONLY
).
Provides the RDD[(VertexId, VD)]
equivalent output.
Provides the RDD[(VertexId, VD)]
equivalent output.
The number of vertices in the RDD.
The number of vertices in the RDD.
Hides vertices that are the same between this
and other
; for vertices that are different,
keeps the values from other
.
Restricts the vertex set to the set of vertices satisfying the given predicate.
Restricts the vertex set to the set of vertices satisfying the given predicate. This operation preserves the index for efficient joins with the original RDD, and it sets bits in the bitmask rather than allocating new memory.
the user defined predicate, which takes a tuple to conform to the
RDD[(VertexId, VD)]
interface
Inner joins this VertexRDD with an RDD containing vertex attribute pairs.
Inner joins this VertexRDD with an RDD containing vertex attribute pairs. If the other RDD is backed by a VertexRDD with the same index then the efficient innerZipJoin implementation is used.
an RDD containing vertices to join. If there are multiple entries for the same vertex, one is picked arbitrarily. Use aggregateUsingIndex to merge multiple entries.
the join function applied to corresponding values of this
and other
a VertexRDD co-indexed with this
, containing only vertices that appear in both this
and other
, with values supplied by f
Efficiently inner joins this VertexRDD with another VertexRDD sharing the same index.
Efficiently inner joins this VertexRDD with another VertexRDD sharing the same index. See innerJoin for the behavior of the join.
Left joins this VertexRDD with an RDD containing vertex attribute pairs.
Left joins this VertexRDD with an RDD containing vertex attribute pairs. If the other RDD is
backed by a VertexRDD with the same index then the efficient leftZipJoin implementation is
used. The resulting VertexRDD contains an entry for each vertex in this
. If other
is
missing any vertex in this VertexRDD, f
is passed None
. If there are duplicates, the vertex
is picked arbitrarily.
the attribute type of the other VertexRDD
the attribute type of the resulting VertexRDD
the other VertexRDD with which to join
the function mapping a vertex id and its attributes in this and the other vertex set to a new vertex attribute.
a VertexRDD containing all the vertices in this VertexRDD with the attributes emitted
by f
.
Left joins this RDD with another VertexRDD with the same index.
Left joins this RDD with another VertexRDD with the same index. This function will fail if both
VertexRDDs do not share the same index. The resulting vertex set contains an entry for each
vertex in this
. If other
is missing any vertex in this VertexRDD, f
is passed None
.
the attribute type of the other VertexRDD
the attribute type of the resulting VertexRDD
the other VertexRDD with which to join.
the function mapping a vertex id and its attributes in this and the other vertex set to a new vertex attribute.
a VertexRDD containing the results of f
Maps each vertex attribute, additionally supplying the vertex ID.
Maps each vertex attribute, additionally supplying the vertex ID.
the type returned by the map function
the function applied to each ID-value pair in the RDD
a new VertexRDD with values obtained by applying f
to each of the entries in the
original VertexRDD. The resulting VertexRDD retains the same index.
Maps each vertex attribute, preserving the index.
Maps each vertex attribute, preserving the index.
the type returned by the map function
the function applied to each value in the RDD
a new VertexRDD with values obtained by applying f
to each of the entries in the
original VertexRDD
Persist this RDD with the default storage level (MEMORY_ONLY
).
Persist this RDD with the default storage level (MEMORY_ONLY
).
Construct a new VertexRDD that is indexed by only the visible vertices.
Construct a new VertexRDD that is indexed by only the visible vertices. The resulting VertexRDD will be based on a different index and can no longer be quickly joined with this RDD.
(Since version 0.7.0) use mapPartitionsWithIndex
Extends
RDD[(VertexId, VD)]
by ensuring that there is only one entry for each vertex and by pre-indexing the entries for fast, efficient joins. Two VertexRDDs with the same index can be joined efficiently. All operations except reindex preserve the index. To construct aVertexRDD
, use the VertexRDD object.the vertex attribute associated with each vertex in the set.
Construct a
VertexRDD
from a plain RDD: