Package org.apache.spark.graphx
Interface PartitionStrategy
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
PartitionStrategy.CanonicalRandomVertexCut$
,PartitionStrategy.EdgePartition1D$
,PartitionStrategy.EdgePartition2D$
,PartitionStrategy.RandomVertexCut$
Represents the way edges are assigned to edge partitions based on their source and destination
vertex IDs.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Assigns edges to partitions by hashing the source and destination vertex IDs in a canonical direction, resulting in a random vertex cut that colocates all edges between two vertices, regardless of direction.static class
Assigns edges to partitions using only the source vertex ID, colocating edges with the same source.static class
Assigns edges to partitions using a 2D partitioning of the sparse edge adjacency matrix, guaranteeing a2 * sqrt(numParts)
bound on vertex replication.static class
Assigns edges to partitions by hashing the source and destination vertex IDs, resulting in a random vertex cut that colocates all same-direction edges between two vertices. -
Method Summary
Modifier and TypeMethodDescriptionint
getPartition
(long src, long dst, int numParts) Returns the partition number for a given edge.
-
Method Details
-
getPartition
int getPartition(long src, long dst, int numParts) Returns the partition number for a given edge.
-