Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-14219

Fix `pickRandomVertex` not to fall into infinite loops for graphs with one vertex

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.2, 2.0.0
    • Component/s: GraphX
    • Labels:
      None

      Description

      Currently, `GraphOps.pickRandomVertex()` falls into infinite loops for graphs having only one vertex. This issue fixes it by modifying the following termination-checking condition.

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

        Attachments

          Activity

            People

            • Assignee:
              dongjoon Dongjoon Hyun
              Reporter:
              dongjoon Dongjoon Hyun
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: