Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Cloudera Exam CCA175 Topic 1 Question 61 Discussion

Actual exam question for Cloudera's CCA175 exam
Question #: 61
Topic #: 1
[All CCA175 Questions]

Problem Scenario 67 : You have been given below code snippet.

lines = sc.parallelize(['lts fun to have fun,','but you have to know how.'])

M = lines.map( lambda x: x.replace(',7 ').replace('.',' 'J.replaceC-V ').lower())

r2 = r1.flatMap(lambda x: x.split())

r3 = r2.map(lambda x: (x, 1))

operation1

r5 = r4.map(lambda x:(x[1],x[0]))

r6 = r5.sortByKey(ascending=False)

r6.take(20)

Write a correct code snippet for operationl which will produce desired output, shown below. [(2, 'fun'), (2, 'to'), (2, 'have'), (1, its'), (1, 'know1), (1, 'how1), (1, 'you'), (1, 'but')]

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Elly
10 months ago
I'd go with option A. Trying to outsmart the question by going for more memory and executors is a classic trap. Keep it simple, people!
upvoted 0 times
Teri
9 months ago
Option A it is then, thanks for the advice!
upvoted 0 times
...
Charolette
9 months ago
Agreed, keeping it simple is the way to go.
upvoted 0 times
...
Cecil
9 months ago
I'd go with option A.
upvoted 0 times
...
...
Josephine
10 months ago
Haha, this reminds me of the time I accidentally set the executor memory to 40GB and wondered why my cluster kept crashing. Option A for the win!
upvoted 0 times
Yoko
9 months ago
Definitely, Option A with 20GB executor memory is the correct choice.
upvoted 0 times
...
Leonida
9 months ago
Yeah, it's important to set it right. Option A is the way to go.
upvoted 0 times
...
Erinn
10 months ago
Haha, I did the same thing once with 40GB executor memory.
upvoted 0 times
...
...
Marget
10 months ago
Hmm, I'm not sure, but I think option A is the way to go. Doesn't hurt to double-check the requirements though, just to be safe.
upvoted 0 times
...
Audrie
10 months ago
Option A looks good to me. The settings seem to match the requirements in the problem statement.
upvoted 0 times
Kirby
9 months ago
-num-executors 50
upvoted 0 times
...
Elvis
9 months ago
I agree, Option A is the correct solution for running the Spark application on yarn with 20GB per executor and 50 executors.
upvoted 0 times
...
Daren
9 months ago
-executor-memory 20G
upvoted 0 times
...
Lizette
10 months ago
Option A looks good to me. The settings seem to match the requirements in the problem statement.
upvoted 0 times
...
Kristine
10 months ago
The settings seem to match the requirements in the problem statement.
upvoted 0 times
...
Tequila
10 months ago
-master yarn
upvoted 0 times
...
Nana
10 months ago
Option A looks good to me.
upvoted 0 times
...
Stephanie
10 months ago
Option A looks good to me. The settings seem to match the requirements in the problem statement.
upvoted 0 times
...
...
Kyoko
11 months ago
I think option A is the correct solution. The problem statement clearly asks for 20GB of memory per executor and 50 executors, which matches option A.
upvoted 0 times
Mohammad
10 months ago
Yes, option A matches the requirements given in the problem scenario.
upvoted 0 times
...
Denae
11 months ago
I agree, option A is the correct solution.
upvoted 0 times
...
...

Save Cancel