Spark - how the solve the below question

0 votes
va1 alphabetRdd1 = sc.parallelize(list(("a",1),("b",2),("c",3)))

sc.parallelize(list(("b","second"),("c","third"),("d","fourth")))

va1 leftouterjoinRdd = alphabetRdd1.leftouterjoin(alphabetRdd2)

leftouterjoinRdd.collect().foreach(println)

a. (a,(1,none))

    (b,(2,some(second)))

    (c,(3,some(third)))

b. (b,((second)))

    (c,((third)))

c. (a,(1))

    (c,(3,some(third)))

d. run time error
Nov 23, 2020 in Apache Spark by ritu
• 960 points
583 views

1 answer to this question.

0 votes

option d,

Runtime error

answered Nov 23, 2020 by Gitika
• 65,910 points

Related Questions In Apache Spark

0 votes
1 answer

How is Apache Spark different from the Hadoop approach?

In Hadoop MapReduce the input data is ...READ MORE

answered May 7, 2018 in Apache Spark by BD Master
987 views
0 votes
2 answers

In a Spark DataFrame how can I flatten the struct?

// Collect data from input avro file ...READ MORE

answered Jul 4, 2019 in Apache Spark by Dhara dhruve
5,723 views
0 votes
1 answer

How to save and retrieve the Spark RDD from HDFS?

You can save the RDD using saveAsObjectFile and saveAsTextFile method. ...READ MORE

answered May 29, 2018 in Apache Spark by Shubham
• 13,490 points
13,036 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How RDD persist the data in Spark?

There are two methods to persist the ...READ MORE

answered Jun 18, 2018 in Apache Spark by nitinrawat895
• 11,380 points
1,192 views
+1 vote
8 answers

How to print the contents of RDD in Apache Spark?

Save it to a text file: line.saveAsTextFile("alicia.txt") Print contains ...READ MORE

answered Dec 10, 2018 in Apache Spark by Akshay
60,748 views
0 votes
1 answer

How to change the location of Spark event logs?

You can change the location where you ...READ MORE

answered Mar 6, 2019 in Apache Spark by Rohit
4,038 views
0 votes
5 answers

How to change the spark Session configuration in Pyspark?

You aren't actually overwriting anything with this ...READ MORE

answered Dec 14, 2020 in Apache Spark by Gitika
• 65,910 points
122,168 views
0 votes
1 answer

How to calculate the result of formula with Scala?

Hi, You can use a simple mathematical calculation ...READ MORE

answered Jul 1, 2019 in Apache Spark by Gitika
• 65,910 points
1,011 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP