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

Add RDD flatten function

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Abandoned
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Spark Core
    • Labels:

      Description

      A new RDD flatten function is similar to flatten function of scala collections:

      spark-shell
      scala> val rdd = sc.makeRDD(List(List(1, 2, 3), List(4, 5), List(6)))
      rdd: org.apache.spark.rdd.RDD[List[Int]] = ParallelCollectionRDD[0] at makeRDD at <console>:24
      
      scala> rdd.flatten.collect
      res0: Array[Int] = Array(1, 2, 3, 4, 5, 6)
      
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              linbojin Linbo
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: