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

takeSample called on empty RDD never ends

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.0
    • 0.9.1, 1.0.0
    • None
    • None

    Description

      It seems, that method takeSample ends in infinite loop if called on empty RDD, trying to collect enough samples.

      val list = List[String]("aaa")

      val rdd = sc.parallelize(list)
      rdd.takeSample(true, 1, System.nanoTime.toInt)

      val empty = rdd.filter(_ => false)
      empty.takeSample(true, 1, System.nanoTime.toInt)

      Attachments

        Activity

          People

            codingcat Nan Zhu
            shinigami Jaroslav Kamenik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: