If you want to view the content of a RDD, one way is to use collect()
:
myRDD.collect().foreach(println)
That's not a good idea, though, when the RDD has billions of lines. Use take()
to take just a few to print out:
myRDD.take(n).foreach(println)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…