You are just performing a transformation(map). In order to view the contents of an RDD, you need to perform actions on the RDDs.
One way is to use collect():
Though it will work finely, when the RDD has billions of lines, collect() won’t be a good option.
You can use take() instead. It will display the result in very less time:
If you want to know more about Spark, then do check out this awesome video tutorial: