diff options
author | Kenji Kikushima <kikushima.kenji@lab.ntt.co.jp> | 2015-01-21 12:34:00 -0800 |
---|---|---|
committer | Ankur Dave <ankurdave@gmail.com> | 2015-01-21 12:38:09 -0800 |
commit | 37db20c9414d26ebd423e9500825bedc037b20f5 (patch) | |
tree | 563c3398c4c6a3ab174c2d090bc5363d87b4497c /external | |
parent | e90f6b5c6e27c60219aa0129b50985ebade048a0 (diff) | |
download | spark-37db20c9414d26ebd423e9500825bedc037b20f5.tar.gz spark-37db20c9414d26ebd423e9500825bedc037b20f5.tar.bz2 spark-37db20c9414d26ebd423e9500825bedc037b20f5.zip |
[SPARK-5064][GraphX] Add numEdges upperbound validation for R-MAT graph generator to prevent infinite loop
I looked into GraphGenerators#chooseCell, and found that chooseCell can't generate more edges than pow(2, (2 * (log2(numVertices)-1))) to make a Power-law graph. (Ex. numVertices:4 upperbound:4, numVertices:8 upperbound:16, numVertices:16 upperbound:64)
If we request more edges over the upperbound, rmatGraph fall into infinite loop. So, how about adding an argument validation?
Author: Kenji Kikushima <kikushima.kenji@lab.ntt.co.jp>
Closes #3950 from kj-ki/SPARK-5064 and squashes the following commits:
4ee18c7 [Ankur Dave] Reword error message and add unit test
d760bc7 [Kenji Kikushima] Add numEdges upperbound validation for R-MAT graph generator to prevent infinite loop.
(cherry picked from commit 3ee3ab592eee831d759c940eb68231817ad6d083)
Signed-off-by: Ankur Dave <ankurdave@gmail.com>
Diffstat (limited to 'external')
0 files changed, 0 insertions, 0 deletions