Unit 3: Map Reduce and YARN - Subjective Questions

INT312 — Big Data Fundamentals • Practice Questions with Detailed Answers

20 questions

1

Define the Mapper class in Hadoop MapReduce. Explain its generic type parameters and describe the basic Java code structure required to implement a mapper.

2

Explain the lifecycle methods of the Hadoop Mapper class. When should setup(), map(), and cleanup() be used?

3

Describe the Java code required to implement a Reducer class in Hadoop MapReduce. Explain the meaning of its input and output types.

4

Explain how the shuffle, sort, and reduce stages connect mapper output to reducer input.

5

Distinguish between the responsibilities of a Mapper and a Reducer in Hadoop MapReduce.

6

Write and explain a Hadoop MapReduce driver program that configures and submits a job.

7

Explain the roles of InputFormat, InputSplit, RecordReader, and OutputFormat in a MapReduce program driver.

8

Define YARN and explain the responsibilities of its major components.

9

Describe the complete execution flow of a MapReduce application on the YARN model.

10

Compare the Hadoop 1.x MapReduce v1 architecture with the Hadoop 2.x YARN architecture.

11

Develop the Mapper and Reducer Java code for the classic word count problem and explain its operation.

12

Write the driver configuration for a word count job. Also explain why the reducer may be used as a combiner.

13

Design a MapReduce program to calculate the sum of all even numbers in a text file. Provide the essential Java code.

14

Explain how the sum of even numbers MapReduce program can be optimized. Discuss combiners, constant keys, overflow, and malformed input.

15

Write a MapReduce program that identifies whether each input number or string is a palindrome.

16

Develop Java MapReduce code to compute the factorial of every non-negative integer in the input. State the mathematical definition and important limitations.

17

Explain why a reducer is usually unnecessary when calculating the factorial of each input number. How would the design change if the task required one combined product?

18

Write a Java MapReduce program to identify Armstrong numbers. Explain the algorithm with an example.

19

Compare the MapReduce designs for palindrome, factorial, and Armstrong number programs.

20

Describe how you would create a reusable driver and ensure type safety, validation, and reliable execution for the numerical MapReduce programs in this unit.