Example: Read Files from the Cluster Local Filesystem

Use the following command in the terminal to read text from the local filesystem.

The file must exist on all hosts, and the same path for the driver and executors. In this example you are reading the file ebay-xbox.csv.

sc.textFile(“file:///tmp/ebay-xbox.csv”)