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

sortByKey() will fail on empty RDD

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.0.2, 1.1.0, 1.2.0
    • Fix Version/s: 1.0.3, 1.1.1, 1.2.0
    • Component/s: PySpark
    • Labels:
      None

      Description

      >>> sc.parallelize(zip(range(4), range(0)), 5).sortByKey().count()
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "/Users/davies/work/spark/python/pyspark/rdd.py", line 532, in sortByKey
          for i in range(0, numPartitions - 1)]
      IndexError: list index out of range
      >>>
      

        Attachments

          Activity

            People

            • Assignee:
              davies Davies Liu
              Reporter:
              davies Davies Liu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: