public class RoutingTablePartition
extends Object
implements scala.Serializable
Constructor and Description |
---|
RoutingTablePartition(scala.Tuple3<long[],org.apache.spark.util.collection.BitSet,org.apache.spark.util.collection.BitSet>[] routingTable) |
Modifier and Type | Method and Description |
---|---|
static scala.collection.Iterator<scala.Tuple2<Object,Object>> |
edgePartitionToMsgs(int pid,
EdgePartition<?,?> edgePartition)
Generate a `RoutingTableMessage` for each vertex referenced in `edgePartition`.
|
static RoutingTablePartition |
empty() |
void |
foreachWithinEdgePartition(int pid,
boolean includeSrc,
boolean includeDst,
scala.Function1<Object,scala.runtime.BoxedUnit> f)
Runs
f on each vertex id to be sent to the specified edge partition. |
static RoutingTablePartition |
fromMsgs(int numEdgePartitions,
scala.collection.Iterator<scala.Tuple2<Object,Object>> iter)
Build a `RoutingTablePartition` from `RoutingTableMessage`s.
|
scala.collection.Iterator<Object> |
iterator()
Returns an iterator over all vertex ids stored in this `RoutingTablePartition`.
|
int |
numEdgePartitions()
The maximum number of edge partitions this `RoutingTablePartition` is built to join with.
|
int |
partitionSize(int pid)
Returns the number of vertices that will be sent to the specified edge partition.
|
RoutingTablePartition |
reverse()
Returns a new RoutingTablePartition reflecting a reversal of all edge directions.
|
public RoutingTablePartition(scala.Tuple3<long[],org.apache.spark.util.collection.BitSet,org.apache.spark.util.collection.BitSet>[] routingTable)
public static RoutingTablePartition empty()
public static scala.collection.Iterator<scala.Tuple2<Object,Object>> edgePartitionToMsgs(int pid, EdgePartition<?,?> edgePartition)
public static RoutingTablePartition fromMsgs(int numEdgePartitions, scala.collection.Iterator<scala.Tuple2<Object,Object>> iter)
public int numEdgePartitions()
public int partitionSize(int pid)
public scala.collection.Iterator<Object> iterator()
public RoutingTablePartition reverse()
public void foreachWithinEdgePartition(int pid, boolean includeSrc, boolean includeDst, scala.Function1<Object,scala.runtime.BoxedUnit> f)
f
on each vertex id to be sent to the specified edge partition. Vertex ids can be
filtered by the position they have in the edge partition.