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

sortByKey() will fail on empty RDD

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.0.2, 1.1.0, 1.2.0
    • 1.0.3, 1.1.1, 1.2.0
    • PySpark
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: