The first code snippet to read the file and return values via take can be broken down into its two components: sc.textFile() and map().