DATABASE FUNDAMENTALS
BASICS OF BIG DATA
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Only map()
|
|
Only reduce()
|
|
map() and reduce()
|
|
The code does not have to be changed
|
Detailed explanation-1: -A map() function can emit up to a maximum number of key/value pairs (depending on the Hadoop environment). A map() function can emit anything between zero and an unlimited number of key/value pairs. A reduce() function can iterate over key/value pairs multiple times.
Detailed explanation-2: -MapReduce Word Count is a framework which splits the chunk of data, sorts the map outputs and input to reduce tasks. A File-system stores the output and input of jobs. Re-execution of failed tasks, scheduling them and monitoring them is the task of the framework.
Detailed explanation-3: -The text from the input text file is tokenized into words to form a key value pair with all the words present in the input text file. The key is the word from the input file and value is ‘1’. This is how the MapReduce word count program executes and outputs the number of occurrences of a word in any given input file.