Question

In: Computer Science

In 150 words or less, define key value pair and, from a high level, explain why...

In 150 words or less, define key value pair and, from a high level, explain why the use of KVPs is important to MapReduce.

Solutions

Expert Solution

Solution :

Define key value pairs :

Key-value pair is two values usually connected in such a way that the value is accessed using the key. They are commonly used in various data-structures to provide fast access to values.

Why the use of KVPs is important to MapReduce :

MapReduce is the foundational framework for processing data at scale because of its ability to break a large problem into any smaller ones
⬢ Mappers read data in the form of KVPs and each call to a Mapper is for a single KVP; it can return 0..m KVPs
⬢ The framework shuffles & sorts the Mappers’ outputted KVPs with the guarantee that only one Reducer will be asked to process a given Key’s data
⬢ Reducers are given a list of Values for a specific Key; they can return 0..m KVPs

MapReduce Example –

Map Phase
Input to Mapper
(8675, ‘I will not eat green eggs and ham’)
(8709, ‘I will not eat them Sam I am’)
...
Output from Mapper

(‘I’, 1), (‘will’, 1), (‘not’, 1), (‘eat’, 1),(‘green’, 1),(‘eggs’, 1), (‘and’, 1)(‘ham’, 1), (‘I’, 1), (‘will’, 1),(‘not’, 1), (‘eat’, 1),(‘them’, 1), (‘Sam’, 1),(‘I’, 1), (‘am’, 1)

Reduce Phase
Input to Reducer
(‘I’, [1, 1, 1]) (‘Sam’, [1]) (‘am’, [1]) (‘and’, [1]) (‘eat’, [1, 1]) (‘eggs’, [1]) (‘green’, [1]) (‘ham’, [1]) (‘not’, [1, 1]) (‘them’, [1]) (‘will’, [1, 1])

Output from Reducer

(‘I’, 3)(‘Sam’, 1)(‘am’, 1) (‘and’, 1) (‘eat’, 2) (‘eggs’, 1) (‘green’, 1) (‘ham’, 1) (‘not’, 2) (‘them’, 1) (‘will’, 2)


Related Solutions

Explain what is the time value of money. (minimum 150 words)
Explain what is the time value of money. (minimum 150 words)
1a) Explain why we reject the null hypothesis when the p-value is less than the level...
1a) Explain why we reject the null hypothesis when the p-value is less than the level of significance? b) Explain to someone unfamiliar with statistics how to tell whether a statistical test is left, right, or two tailed. Explain what to look for in the wording of a hypothesis test and with the alternate hypothesis. c) Why can we never truly accept the null hypothesis?
Discuss/Explain: Two key concepts related to end of life care. 150 words.
Discuss/Explain: Two key concepts related to end of life care. 150 words.
In Perl: Create a dictionary of at least 5 key/value pairs. Add a new key/value pair...
In Perl: Create a dictionary of at least 5 key/value pairs. Add a new key/value pair to the dictionary. Change one of the values through reassignment. Access at least 3 values using the keys. Access at least 3 keys using the values. Delete an element. Test for key inclusion for 3 elements. Loop through the dictionary, printing out the key and value on the same line separated by a space. Key1, value1 Key2, value2 …,     … (Please if you...
In Python: Create a dictionary of at least 5 key/value pairs. Add a new key/value pair...
In Python: Create a dictionary of at least 5 key/value pairs. Add a new key/value pair to the dictionary. Change one of the values through reassignment. Access at least 3 values using the keys. Access at least 3 keys using the values. Delete an element. Test for key inclusion for 3 elements. Loop through the dictionary, printing out the key and value on the same line separated by a space. Key1, value1 Key2, value2 …,     … (Please if you...
Explain why the supply of housing is inelastic in the short-term. (150 words)
Explain why the supply of housing is inelastic in the short-term. (150 words)
Explain, in your own words (150~300 words), why the common conception of a “gene for trait...
Explain, in your own words (150~300 words), why the common conception of a “gene for trait X” may be misleading. [Hint: Think about what the connection between a genotype and a phenotype is, and what additional factor(s) may come into play]
Topic = Customer  lifetime value defination (100 words ) explain (150 words ) and give two examples...
Topic = Customer  lifetime value defination (100 words ) explain (150 words ) and give two examples ( eg. how it works , steps involved use and limitations and specific products organisations or issues and etc ) around 150 words plagiarism free
WRITE A SUMMARY IN 150 WORDS OR LESS FOR THE INFORMATION BELOW Synchronous learning is the...
WRITE A SUMMARY IN 150 WORDS OR LESS FOR THE INFORMATION BELOW Synchronous learning is the kind of learning that happens in real time. This means that you, your classmates, and your instructor interact in a specific virtual place, through a specific online medium, at a specific time. In other words, it’s not exactly anywhere, anyhow, anytime. Methods of synchronous online learning include video conferencing, teleconferencing, live chatting, and live-streaming lectures. What are the advantages of synchronous learning Classroom Engagement...
What are the key management information requirements? 120–150 words Please do not copy and paste from...
What are the key management information requirements? 120–150 words Please do not copy and paste from another source. Thanks
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT