Apache Spark Basics

21 / 69
Apache Spark - Which of the following is python code thats reads data...

Which of the following is python code thats reads data from HDFS file using pyspark?

  • val mydata = sparkContext.textFile("/data/mr/wordcount/input/")
  • val mydata = HDFS.textFile("/data/mr/wordcount/input/")
  • var mydata = sc.textFile("/data/mr/wordcount/input/")
  • mydata = sc.textFile("/data/mr/wordcount/input/")
  • None, It is not possible using pyspark