Rewriting a Spark map-reduceByKey Chain to Run on a Block Sample

Company: Accenture

Difficulty: medium

Problem Statement

Question 1

For the given Spark query, which of the following defines the equivalent query that runs the same computation over a 10% block sample of the input? ``` 1 sq = file.map(ar =>(ar.rank, ar.size)) 2 val = sq.reduceByKey((p,q) => p*q).collect() ```