Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

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.

-      if (selectedVertices.count > 1) {
+      if (selectedVertices.count > 0) {

How was this patch tested?

Pass the Jenkins tests (including new test case).

…e loops for graphs with one vertex

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) {
```

Pass the Jenkins tests (including new test case).
@SparkQA
Copy link

SparkQA commented Mar 29, 2016

Test build #54397 has finished for PR 12021 at commit e3fbb33.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member Author

Hi, @rxin .
This is [SPARK-14219] for branch-1.6.
Thank you again.

@rxin
Copy link
Contributor

rxin commented Mar 29, 2016

Thanks - I've merged this. Can you close the pull request? Because it is not merged in master it wouldn't auto close.

asfgit pushed a commit that referenced this pull request Mar 29, 2016
## 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 #12021 from dongjoon-hyun/SPARK-14219-2.
@dongjoon-hyun
Copy link
Member Author

Thank you!

@dongjoon-hyun dongjoon-hyun deleted the SPARK-14219-2 branch March 29, 2016 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants