public class VertexRDDImpl<VD> extends VertexRDD<VD>
Modifier and Type | Method and Description |
---|---|
<VD2> VertexRDD<VD2> |
aggregateUsingIndex(RDD<scala.Tuple2<java.lang.Object,VD2>> messages,
scala.Function2<VD2,VD2,VD2> reduceFunc,
scala.reflect.ClassTag<VD2> evidence$12)
Aggregates vertices in
messages that have the same ids using reduceFunc , returning a
VertexRDD co-indexed with this . |
VertexRDDImpl<VD> |
cache()
Persists the vertex partitions at `targetStorageLevel`, which defaults to MEMORY_ONLY.
|
void |
checkpoint()
Mark this RDD for checkpointing.
|
long |
count()
The number of vertices in the RDD.
|
VertexRDD<VD> |
diff(RDD<scala.Tuple2<java.lang.Object,VD>> other)
For each vertex present in both
this and other , diff returns only those vertices with
differing values; for values that are different, keeps the values from other . |
VertexRDD<VD> |
diff(VertexRDD<VD> other)
For each vertex present in both
this and other , diff returns only those vertices with
differing values; for values that are different, keeps the values from other . |
scala.Option<java.lang.String> |
getCheckpointFile()
Gets the name of the directory to which this RDD was checkpointed.
|
protected scala.collection.Seq<java.lang.String> |
getPreferredLocations(Partition s)
Optionally overridden by subclasses to specify placement preferences.
|
StorageLevel |
getStorageLevel()
Get the RDD's current storage level, or StorageLevel.NONE if none is set.
|
<U,VD2> VertexRDD<VD2> |
innerJoin(RDD<scala.Tuple2<java.lang.Object,U>> other,
scala.Function3<java.lang.Object,VD,U,VD2> f,
scala.reflect.ClassTag<U> evidence$10,
scala.reflect.ClassTag<VD2> evidence$11)
Inner joins this VertexRDD with an RDD containing vertex attribute pairs.
|
<U,VD2> VertexRDD<VD2> |
innerZipJoin(VertexRDD<U> other,
scala.Function3<java.lang.Object,VD,U,VD2> f,
scala.reflect.ClassTag<U> evidence$8,
scala.reflect.ClassTag<VD2> evidence$9)
Efficiently inner joins this VertexRDD with another VertexRDD sharing the same index.
|
boolean |
isCheckpointed()
Return whether this RDD is checkpointed and materialized, either reliably or locally.
|
<VD2,VD3> VertexRDD<VD3> |
leftJoin(RDD<scala.Tuple2<java.lang.Object,VD2>> other,
scala.Function3<java.lang.Object,VD,scala.Option<VD2>,VD3> f,
scala.reflect.ClassTag<VD2> evidence$6,
scala.reflect.ClassTag<VD3> evidence$7)
Left joins this VertexRDD with an RDD containing vertex attribute pairs.
|
<VD2,VD3> VertexRDD<VD3> |
leftZipJoin(VertexRDD<VD2> other,
scala.Function3<java.lang.Object,VD,scala.Option<VD2>,VD3> f,
scala.reflect.ClassTag<VD2> evidence$4,
scala.reflect.ClassTag<VD3> evidence$5)
Left joins this RDD with another VertexRDD with the same index.
|
<VD2> VertexRDD<VD2> |
mapValues(scala.Function1<VD,VD2> f,
scala.reflect.ClassTag<VD2> evidence$2)
Maps each vertex attribute, preserving the index.
|
<VD2> VertexRDD<VD2> |
mapValues(scala.Function2<java.lang.Object,VD,VD2> f,
scala.reflect.ClassTag<VD2> evidence$3)
Maps each vertex attribute, additionally supplying the vertex ID.
|
VertexRDD<VD> |
minus(RDD<scala.Tuple2<java.lang.Object,VD>> other)
For each VertexId present in both
this and other , minus will act as a set difference
operation returning only those unique VertexId's present in this . |
VertexRDD<VD> |
minus(VertexRDD<VD> other)
For each VertexId present in both
this and other , minus will act as a set difference
operation returning only those unique VertexId's present in this . |
scala.Option<Partitioner> |
partitioner()
Optionally overridden by subclasses to specify how they are partitioned.
|
RDD<org.apache.spark.graphx.impl.ShippableVertexPartition<VD>> |
partitionsRDD() |
VertexRDDImpl<VD> |
persist(StorageLevel newLevel)
Persists the vertex partitions at the specified storage level, ignoring any existing target
storage level.
|
VertexRDD<VD> |
reindex()
Construct a new VertexRDD that is indexed by only the visible vertices.
|
VertexRDD<VD> |
reverseRoutingTables()
Returns a new
VertexRDD reflecting a reversal of all edge directions in the corresponding
EdgeRDD . |
VertexRDDImpl<VD> |
setName(java.lang.String _name)
Assign a name to this RDD
|
StorageLevel |
targetStorageLevel() |
VertexRDDImpl<VD> |
unpersist(boolean blocking)
Mark the RDD as non-persistent, and remove all blocks for it from memory and disk.
|
protected scala.reflect.ClassTag<VD> |
vdTag() |
VertexRDD<VD> |
withEdges(EdgeRDD<?> edges)
Prepares this VertexRDD for efficient joins with the given EdgeRDD.
|
apply, apply, apply, compute, filter, fromEdges, getPartitions
aggregate, cartesian, checkpointData, clearDependencies, coalesce, collect, collect, context, countApprox, countApproxDistinct, countApproxDistinct, countByValue, countByValueApprox, creationSite, dependencies, distinct, distinct, doubleRDDToDoubleRDDFunctions, filterWith, first, firstParent, flatMap, flatMapWith, fold, foreach, foreachPartition, foreachWith, getDependencies, glom, groupBy, groupBy, groupBy, id, intersection, intersection, intersection, isEmpty, iterator, keyBy, localCheckpoint, map, mapPartitions, mapPartitionsWithContext, mapPartitionsWithIndex, mapPartitionsWithSplit, mapWith, max, min, name, numericRDDToDoubleRDDFunctions, parent, partitions, persist, pipe, pipe, pipe, preferredLocations, randomSplit, rddToAsyncRDDActions, rddToOrderedRDDFunctions, rddToPairRDDFunctions, rddToSequenceFileRDDFunctions, reduce, repartition, sample, saveAsObjectFile, saveAsTextFile, saveAsTextFile, scope, sortBy, sparkContext, subtract, subtract, subtract, take, takeOrdered, takeSample, toArray, toDebugString, toJavaRDD, toLocalIterator, top, toString, treeAggregate, treeReduce, union, zip, zipPartitions, zipPartitions, zipPartitions, zipPartitions, zipPartitions, zipPartitions, zipWithIndex, zipWithUniqueId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public StorageLevel targetStorageLevel()
public VertexRDD<VD> reindex()
VertexRDD
public scala.Option<Partitioner> partitioner()
RDD
partitioner
in class RDD<scala.Tuple2<java.lang.Object,VD>>
protected scala.collection.Seq<java.lang.String> getPreferredLocations(Partition s)
RDD
getPreferredLocations
in class RDD<scala.Tuple2<java.lang.Object,VD>>
s
- (undocumented)public VertexRDDImpl<VD> setName(java.lang.String _name)
RDD
public VertexRDDImpl<VD> persist(StorageLevel newLevel)
public VertexRDDImpl<VD> unpersist(boolean blocking)
RDD
public VertexRDDImpl<VD> cache()
public StorageLevel getStorageLevel()
RDD
getStorageLevel
in class RDD<scala.Tuple2<java.lang.Object,VD>>
public void checkpoint()
RDD
SparkContext#setCheckpointDir
and all references to its parent
RDDs will be removed. This function must be called before any job has been
executed on this RDD. It is strongly recommended that this RDD is persisted in
memory, otherwise saving it on a file will require recomputation.checkpoint
in class RDD<scala.Tuple2<java.lang.Object,VD>>
public boolean isCheckpointed()
RDD
isCheckpointed
in class RDD<scala.Tuple2<java.lang.Object,VD>>
public scala.Option<java.lang.String> getCheckpointFile()
RDD
getCheckpointFile
in class RDD<scala.Tuple2<java.lang.Object,VD>>
public long count()
public <VD2> VertexRDD<VD2> mapValues(scala.Function1<VD,VD2> f, scala.reflect.ClassTag<VD2> evidence$2)
VertexRDD
public <VD2> VertexRDD<VD2> mapValues(scala.Function2<java.lang.Object,VD,VD2> f, scala.reflect.ClassTag<VD2> evidence$3)
VertexRDD
public VertexRDD<VD> minus(RDD<scala.Tuple2<java.lang.Object,VD>> other)
VertexRDD
this
and other
, minus will act as a set difference
operation returning only those unique VertexId's present in this
.
public VertexRDD<VD> minus(VertexRDD<VD> other)
VertexRDD
this
and other
, minus will act as a set difference
operation returning only those unique VertexId's present in this
.
public VertexRDD<VD> diff(RDD<scala.Tuple2<java.lang.Object,VD>> other)
VertexRDD
this
and other
, diff
returns only those vertices with
differing values; for values that are different, keeps the values from other
. This is
only guaranteed to work if the VertexRDDs share a common ancestor.
public VertexRDD<VD> diff(VertexRDD<VD> other)
VertexRDD
this
and other
, diff
returns only those vertices with
differing values; for values that are different, keeps the values from other
. This is
only guaranteed to work if the VertexRDDs share a common ancestor.
public <VD2,VD3> VertexRDD<VD3> leftZipJoin(VertexRDD<VD2> other, scala.Function3<java.lang.Object,VD,scala.Option<VD2>,VD3> f, scala.reflect.ClassTag<VD2> evidence$4, scala.reflect.ClassTag<VD3> evidence$5)
VertexRDD
this
.
If other
is missing any vertex in this VertexRDD, f
is passed None
.
leftZipJoin
in class VertexRDD<VD>
other
- the other VertexRDD with which to join.f
- the function mapping a vertex id and its attributes in this and the other vertex set
to a new vertex attribute.evidence$4
- (undocumented)evidence$5
- (undocumented)f
public <VD2,VD3> VertexRDD<VD3> leftJoin(RDD<scala.Tuple2<java.lang.Object,VD2>> other, scala.Function3<java.lang.Object,VD,scala.Option<VD2>,VD3> f, scala.reflect.ClassTag<VD2> evidence$6, scala.reflect.ClassTag<VD3> evidence$7)
VertexRDD
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.
leftJoin
in class VertexRDD<VD>
other
- the other VertexRDD with which to joinf
- the function mapping a vertex id and its attributes in this and the other vertex set
to a new vertex attribute.evidence$6
- (undocumented)evidence$7
- (undocumented)f
.public <U,VD2> VertexRDD<VD2> innerZipJoin(VertexRDD<U> other, scala.Function3<java.lang.Object,VD,U,VD2> f, scala.reflect.ClassTag<U> evidence$8, scala.reflect.ClassTag<VD2> evidence$9)
VertexRDD
innerJoin
for the behavior of the join.innerZipJoin
in class VertexRDD<VD>
other
- (undocumented)f
- (undocumented)evidence$8
- (undocumented)evidence$9
- (undocumented)public <U,VD2> VertexRDD<VD2> innerJoin(RDD<scala.Tuple2<java.lang.Object,U>> other, scala.Function3<java.lang.Object,VD,U,VD2> f, scala.reflect.ClassTag<U> evidence$10, scala.reflect.ClassTag<VD2> evidence$11)
VertexRDD
innerZipJoin
implementation
is used.
innerJoin
in class VertexRDD<VD>
other
- 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.f
- the join function applied to corresponding values of this
and other
evidence$10
- (undocumented)evidence$11
- (undocumented)this
, containing only vertices that appear in both
this
and other
, with values supplied by f
public <VD2> VertexRDD<VD2> aggregateUsingIndex(RDD<scala.Tuple2<java.lang.Object,VD2>> messages, scala.Function2<VD2,VD2,VD2> reduceFunc, scala.reflect.ClassTag<VD2> evidence$12)
VertexRDD
messages
that have the same ids using reduceFunc
, returning a
VertexRDD co-indexed with this
.
aggregateUsingIndex
in class VertexRDD<VD>
messages
- an RDD containing messages to aggregate, where each message is a pair of its
target vertex ID and the message datareduceFunc
- the associative aggregation function for merging messages to the same vertexevidence$12
- (undocumented)this
, containing only vertices that received messages.
For those vertices, their values are the result of applying reduceFunc
to all received
messages.public VertexRDD<VD> reverseRoutingTables()
VertexRDD
VertexRDD
reflecting a reversal of all edge directions in the corresponding
EdgeRDD
.reverseRoutingTables
in class VertexRDD<VD>