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

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.
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
What are the key management information requirements? Discuss in 120–150 words.
What are the key management information requirements? Discuss in 120–150 words.
A key factor that affects technology decisions is scalability. Define scalability. Explain the difference between high...
A key factor that affects technology decisions is scalability. Define scalability. Explain the difference between high scalability, infinite scalability, and low scalability.
In 150 words or less, discuss the role of nationalism in a participatory economy. Use theories...
In 150 words or less, discuss the role of nationalism in a participatory economy. Use theories presented in the book to demonstrate the relationship between the two and to explain what happens to the economy when inclusion is not allowed. Overly long answers will be penalized - this is an exercise in being concise and to the point.
In less than 250 words explain the value and exchange process in Samsungs marketing plan
In less than 250 words explain the value and exchange process in Samsungs marketing plan
“discuss time value of money” 150 words or more
“discuss time value of money” 150 words or more
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT