Enrollments Open for Advanced Certification Courses on Data Science, ML & AI by E&ICT Academy IIT Roorkee

  Apply Now

Apache Spark - Creating RDD

INSTRUCTIONS
  • Method 1: By Directly Loading a file from remote

    var lines = sc.textFile("/data/mr/wordcount/input/big.txt")
    

    Write the following command in a new cell:

    lines.take(10)
    
  • Method 2: By distributing existing object

    val arr = 1 to 10000
    var nums = sc.parallelize(arr)
    

    Write the following command in a new cell:

    nums.take(10)
    

No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...