MapReduce practice questions



Set of questions & answers to test your introductory knowledge on MapReduce concepts

1. Which of the following could be an analogy example for MapReduce?

    a. Feeding the pigeons
    b. People standing in queue for a bus
    c. People going out for collecting donations
    d. Athletes running in a relay-race

1. Which of the following could be an analogy example for MapReduce?

Answer: C.
People going out for collecting donations


Explanation: People going out for donation collection can collect money in parallel like map jobs and finally aggregate the collection in one place like in reduce phase.

2. What is the sequence of a MapReduce Job?

    a. Map, input split, reduce
    b. Input split, map, reduce
    c. Map and then reduce
    d. Map, split, map

2. What is the sequence of a MapReduce Job?

Answer: b.
Input split, map, reduce


Explanation: For MapReduce, first the input data needs to be split on multiple nodes for parallel processing. So 'b' is the correct answer.

3. Where is the Mapper Output (intermediate kay-value data) stored ?

    a. Local File System
    b. HDFS
    c. It is not stored
    d. Developer can specify location

3. Where is the Mapper Output (intermediate kay-value data) stored ?

Answer: a.
Local File System


Explanation: The mapper output (intermediate data) is stored on the Local file system and not on HDFS of each individual mapper nodes. Hadoop administrator can typically configure this location.

4. What is speculative execution?

    a. Delaying Execution of jobs by specific interval
    b. Run multiple copies of same task on different nodes
    c. Running MapReduce with zero reducers
    d. When combiners are required

4. What is speculative execution?

Answer: b.
Run multiple copies of same task on different nodes


Explanation: In large clusters, some machines may not be performaing well. To avoid this, speculative execution can run multiple copies of same map or reduce task on different slave nodes. The results from first node to finish are used.
Click on page number to flip the pages.