Part I

Question 1: (b)
A.txt is read 2 times: one time to compute RDD_B.count(), and one time to compute and cache RDD_D during the first reduce action. The second reduce action uses the cached content of RDD_D.

Question 2: (a)
Only Cairo and Turin occur more than two times. The cleanup method emits one value for each reducer. A potential output is 2 in one part file and 0 in the other one.

Exercise 1.2 - Number of instances of the reducer - Job 1: (c)
Any number >=1. Each reducer processes a subset of products and emits its local best product.

Exercise 1.3 - Number of instances of the reducer - Job 2: (c)
Exactly 1. The second job selects the global best product among the local best products emitted by the first job.
