Dongjoon Hyun created SPARK-14219:
-------------------------------------

             Summary: Fix `pickRandomVertex` not to fall into infinite loops 
for graphs with one vertex
                 Key: SPARK-14219
                 URL: https://issues.apache.org/jira/browse/SPARK-14219
             Project: Spark
          Issue Type: Bug
          Components: GraphX
            Reporter: Dongjoon Hyun


Currently, `GraphOps.pickRandomVertex()` falls into infinite loops for graphs 
having only one vertex. This issue fixes it by modifying the following 
termination-checking condition.
{code}
-      if (selectedVertices.count > 1) {
+      if (selectedVertices.count > 0) {
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to