Reading and Writing data using files


Originally published at:

As part of this topic let us explore how to read files from file system and write it back to file system. We will use HDFS as underlying file system. Reading files We can read files from local file system using file:// protocol and HDFS using hdfs:// Following are the APIs on SparkContext object (eg:…