Advertisement
Guest User

edge_partition

a guest
Dec 6th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.26 KB | None | 0 0
  1. case object EdgePartition1D extends PartitionStrategy {
  2.   override def getPartition(src: VertexId, dst: VertexId, numParts: PartitionID): PartitionID = {
  3.     val mixingPrime: VertexId = 1125899906842597L
  4.     (math.abs(src * mixingPrime) % numParts).toInt
  5.   }
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement