diff --git a/graph/src/main/scala/org/apache/spark/graph/impl/GraphImpl.scala b/graph/src/main/scala/org/apache/spark/graph/impl/GraphImpl.scala index bcb2ae1ec8f0ea53113c381d6c05d74069659fe7..09aeade8c12bef113d9bbc83f6ce085cfa9cd0e7 100644 --- a/graph/src/main/scala/org/apache/spark/graph/impl/GraphImpl.scala +++ b/graph/src/main/scala/org/apache/spark/graph/impl/GraphImpl.scala @@ -466,6 +466,15 @@ object GraphImpl { } + /** + * Assign edges to an aribtrary machine corresponding to a + * random vertex cut. + */ + protected def randomVertexCut(src: Vid, dst: Vid, numParts: Pid): Pid = { + math.abs((src, dst).hashCode()) % Pid + } + + /** * @todo(crankshaw) how does this effect load balancing? */