logo

Crowdly

Browser

Add to Chrome

Яке значення буде виведено в print(acc.value) ? acc = sc.accumulator...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Яке значення буде виведено в print(acc.value)?

acc = sc.accumulator(0)

rdd = sc.parallelize([1,2,3])

def f(x):

  acc.add(1)

  return x

r = rdd.map(f).cache()

r.count()

r.collect()

print(acc.value)

0%
0%
0%
100%
More questions like this

Want instant access to all verified answers on veem.nltu.edu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome