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 22, 2020 in Apache Spark by ritu
• 980 points
84 views

1 answer to this question.

0 votes

option d,

Runtime error

answered Nov 23, 2020 by Gitika
• 65,930 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
359 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
3,768 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,480 points
8,177 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
754 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
46,267 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
2,008 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 13, 2020 in Apache Spark by Gitika
• 65,930 points
60,648 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,930 points
377 views