diff options
author | Dongjoon Hyun <dongjoon@apache.org> | 2016-03-28 17:38:45 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-03-28 17:38:45 -0700 |
commit | 289257c4c6005779e416b23e593c61e6531b2d9a (patch) | |
tree | bf7279469fe2d98c0672f9d42ca1c57fd131af86 /project/MimaExcludes.scala | |
parent | 2bc7c96d61a51bd458ba04e9d318640ddada559d (diff) | |
download | spark-289257c4c6005779e416b23e593c61e6531b2d9a.tar.gz spark-289257c4c6005779e416b23e593c61e6531b2d9a.tar.bz2 spark-289257c4c6005779e416b23e593c61e6531b2d9a.zip |
[SPARK-14219][GRAPHX] Fix `pickRandomVertex` not to fall into infinite loops for graphs with one vertex
## What changes were proposed in this pull request?
Currently, `GraphOps.pickRandomVertex()` falls into infinite loops for graphs having only one vertex. This PR fixes it by modifying the following termination-checking condition.
```scala
- if (selectedVertices.count > 1) {
+ if (selectedVertices.count > 0) {
```
## How was this patch tested?
Pass the Jenkins tests (including new test case).
Author: Dongjoon Hyun <dongjoon@apache.org>
Closes #12018 from dongjoon-hyun/SPARK-14219.
Diffstat (limited to 'project/MimaExcludes.scala')
0 files changed, 0 insertions, 0 deletions