July 2017
Beginner to intermediate
420 pages
10h 56m
English
I can also load an RDD from a text file, and that could be anywhere.
sc.textFile("file:///c:/users/frank/gobs-o-text.txt")
In this example, I have a giant text file that's the entire encyclopedia or something. I'm reading that from my local disk here, but I could also use s3n if I want to host this file on a distributed AmazonS3 bucket, or hdfs if I want to refer to data that's stored on a distributed HDFS cluster (that stands for Hadoop Distributed File System if you're not familiar with HDFS). When you're dealing with big data and working with a Hadoop cluster, usually that's where your data will live.
That line of code will actually convert every line of that text file into its own row in an RDD. So, you ...
Read now
Unlock full access