What will be printed when the below code is executed

0 votes
What will be printed when the below code is executed?

val numRdd = sc.parallelize(List(5,100,3,235,100,0))
val sum = numRdd.fold(0){(memo: Int, n: Int) =>
memo+n
}
println(sum)

a.443
b.445
c.450
d. runtime error
Nov 25, 2020 in Apache Spark by ritu
• 980 points
290 views

1 answer to this question.

0 votes

Option D)  runtime error

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

Related Questions In Apache Spark

0 votes
1 answer

What will be printed when the below code is executed?

Option b) .List(0,3,5) The takeOrdered method returns the smallest n elements in a ...READ MORE

answered Nov 26, 2020 in Apache Spark by Gitika
• 65,910 points
198 views
–1 vote
0 answers
0 votes
1 answer

From the below code. what is the most appropriate next step in ML process?

Hi@ritu, The most appropriate step according to me ...READ MORE

answered Nov 25, 2020 in Apache Spark by MD
• 95,220 points
91 views
0 votes
1 answer

What does the below code print?

Option d) Run time error. READ MORE

answered Nov 25, 2020 in Apache Spark by Gitika
• 65,910 points
96 views
0 votes
0 answers

What does the below code print?

What does the below code print? val AgeDs ...READ MORE

Nov 24, 2020 in Apache Spark by ritu
• 980 points

closed Nov 25, 2020 by Gitika 421 views
0 votes
1 answer

What is the output of the following code?

After executing your code, there is an ...READ MORE

answered Nov 25, 2020 in Apache Spark by Gitika
• 65,910 points
107 views
0 votes
1 answer

13)Refer the input and identify the output if the below code is run

Option c)  Run time error - A READ MORE

answered Nov 25, 2020 in Apache Spark by Gitika
• 65,910 points
88 views
0 votes
0 answers

What is the output of the following code?

What is the output of the following ...READ MORE

Nov 24, 2020 in Apache Spark by Edureka
• 200 points

closed Nov 25, 2020 by MD 68 views
0 votes
1 answer

2)What will be printed when the below code is executed ?

Hi, @Ritu, List(5,100,10) is printed. The take method returns the first n elements in ...READ MORE

answered Nov 23, 2020 in Apache Spark by Gitika
• 65,910 points
95 views
0 votes
1 answer

What will be printed when the below code is executed ?

Option a) List(5,100,10) The take method returns the first n elements in an ...READ MORE

answered Nov 26, 2020 in Apache Spark by Gitika
• 65,910 points
78 views