顯示 RDD 內容

要顯示 RDD 的內容,必須列印:

myRDD.foreach(println)

限制列印的行數:

myRDD.take(num_of_rows).foreach(println)