SlideShare a Scribd company logo
Map Reduce
Session 4
2
Combiners
• When people think of map reduce, or dbs, they think
how to enhance the process by reduce data network
traffic.
• Increase the Map-Reduce processing efficiency using
the combiners.
• It is basically a function that does what the reducer
does, but on mapper side.
Word count Map reduce
3
Map Reduce with combiner
4
5
Combiners Motivation
• Moving data between nodes is one of the bottlenecks
in distributed systems.
• We need to find always solutions to reduce the
amount of data movement in the network.
• In most cases , mappers produce large amounts of
intermediate data passed on to the reducers for
further processing. Which leads to enormous network
congestion.
• One of the solutions is to reduce the mapper output
using compiners “mini reducers”
How combiners work
6
• The combiner must implement the Reducer interface’s reduce() method.
• The combiner process on each map output key & value (same as reducer).
• Combiner runs on the map side.
• The output of the combiner passed to the reducer.
• Reducers maybe used as combiners if the OP is commutative and associative.
• Combiner and reducer are often identical
• Combiners and reducer must have identical input and output data types.
• The operation must be commutative and associative.
Associative and commutative
• The commutative property states that you can move numbers around and you
still arrive at the same answer.
• a+b = b+a
• 1+2 =2+1
• A*B = B*A
• 1*2=2*1
• The associative property states that you can regroup numbers and you will get
the same answer.
• (a+b)+c=a+(b+c)
• (1+2)+3=1+(2+3)
• (A*B)*C=A*(B*C)
• (1*2)*3=1*(2*3)
7
With and without combiner
8
Mapper 1
Mapper 2
(the,1)
(the,1)
(the,1)
(the,1)
(the,1)
Sum(the ,1,1,1
)
Sum(the ,1,1)
Sum(the ,1,1,1,1,1)
Sum(the ,3,2
)
(The,5)
(The,5)
With and without combiner
9
Mapper 1
Mapper 2
(the,0.3
)
(the,0.4
)
(the,0.7
)
(the,0.5)
(the,0.6)
AVG(the ,0.3,0.4,0.
7)
AVG(the ,0.5,0.6)
AVG(the ,0.3,0.4,0.7,0.5,0
.6)
AVG(the ,0.467,0.5
5)
(The,0.5085)
(The,0.5)
The Inverted index
10
Inverted index using map
reduce
11
10/22/2024 PRESENTATION TITLE 12
Map output
<The@file1, 1>
<Today@file1, 1>
<Today@file1, 1>
<Today@file1, 1>
<The@file2, 1>
<Today@file2, 1>
10/22/2024 PRESENTATION TITLE 13
Combiner input &
output
<The@file1, (1)>
<Today@file1, (1,1,1)>
<The@file2, (1)>
<Today@file2, (1)>
<The file1:1>
<Today file1:3>
<The file2:1>
<Today file2:1>
10/22/2024 PRESENTATION TITLE 14
Reducer input &
output
<The file1: 1, file2: 1 >
<Today file1:3, file2:1 >
<The 2 , (file1:1,file2:1)>
<Today 2, (file1:3,file2:1)>
Let’s
Code

More Related Content

PDF
Hadoop combiner and partitioner
PDF
Lecture 3: Data-Intensive Computing for Text Analysis (Fall 2011)
PDF
lec8_ref.pdf
PDF
Design patterns in MapReduce
PPT
design mapping lecture6-mapreducealgorithmdesign.ppt
PDF
Big Data, a space adventure - Mario Cartia - Codemotion Rome 2015
PPTX
Lecture 04 big data analytics | map reduce
PDF
Automatic Synthesis of Combiners in the MapReduce Framework
Hadoop combiner and partitioner
Lecture 3: Data-Intensive Computing for Text Analysis (Fall 2011)
lec8_ref.pdf
Design patterns in MapReduce
design mapping lecture6-mapreducealgorithmdesign.ppt
Big Data, a space adventure - Mario Cartia - Codemotion Rome 2015
Lecture 04 big data analytics | map reduce
Automatic Synthesis of Combiners in the MapReduce Framework

Similar to map reduce 4.............................. (20)

PPTX
MapMap-Reduce recipes in with c#
PPTX
Introduction to Map-Reduce in Hadoop.pptx
PPTX
Introduction to Map-Reduce in Hadoop.pptx
PDF
MapReduce Algorithm Design - Parallel Reduce Operations
PPT
Big Data, a space adventure - Mario Cartia - Codemotion Milan 2014
PPTX
Introduction to MapReduce
PDF
Introduction to map reduce
PPTX
Introduction to Map Reduce
PDF
Lecture 2: Data-Intensive Computing for Text Analysis (Fall 2011)
PPTX
Repartition join in mapreduce
PDF
2 mapreduce-model-principles
PPTX
Module3 for enginerring students ppt.pptx
PDF
bigD3_mapReducebigD3_mapReducebigD3_mapReduce.pdf
PPTX
SN-BDA-MR-Analysis-6.pptx.................
KEY
Buzz words
PPSX
Assignment of Different-Sized Inputs in MapReduce
PPTX
What is MapReduce ?
PDF
Architecting for the cloud map reduce creating
PPTX
MapReduce.pptx
PDF
02 Map Reduce
MapMap-Reduce recipes in with c#
Introduction to Map-Reduce in Hadoop.pptx
Introduction to Map-Reduce in Hadoop.pptx
MapReduce Algorithm Design - Parallel Reduce Operations
Big Data, a space adventure - Mario Cartia - Codemotion Milan 2014
Introduction to MapReduce
Introduction to map reduce
Introduction to Map Reduce
Lecture 2: Data-Intensive Computing for Text Analysis (Fall 2011)
Repartition join in mapreduce
2 mapreduce-model-principles
Module3 for enginerring students ppt.pptx
bigD3_mapReducebigD3_mapReducebigD3_mapReduce.pdf
SN-BDA-MR-Analysis-6.pptx.................
Buzz words
Assignment of Different-Sized Inputs in MapReduce
What is MapReduce ?
Architecting for the cloud map reduce creating
MapReduce.pptx
02 Map Reduce
Ad

Recently uploaded (20)

PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
medical staffing services at VALiNTRY
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
System and Network Administraation Chapter 3
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
AI in Product Development-omnex systems
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Essential Infomation Tech presentation.pptx
PDF
Nekopoi APK 2025 free lastest update
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Introduction to Artificial Intelligence
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
How to Choose the Right IT Partner for Your Business in Malaysia
medical staffing services at VALiNTRY
Understanding Forklifts - TECH EHS Solution
VVF-Customer-Presentation2025-Ver1.9.pptx
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
System and Network Administraation Chapter 3
Wondershare Filmora 15 Crack With Activation Key [2025
AI in Product Development-omnex systems
Upgrade and Innovation Strategies for SAP ERP Customers
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Essential Infomation Tech presentation.pptx
Nekopoi APK 2025 free lastest update
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Reimagine Home Health with the Power of Agentic AI​
Introduction to Artificial Intelligence
Ad

map reduce 4..............................

  • 2. 2 Combiners • When people think of map reduce, or dbs, they think how to enhance the process by reduce data network traffic. • Increase the Map-Reduce processing efficiency using the combiners. • It is basically a function that does what the reducer does, but on mapper side.
  • 3. Word count Map reduce 3
  • 4. Map Reduce with combiner 4
  • 5. 5 Combiners Motivation • Moving data between nodes is one of the bottlenecks in distributed systems. • We need to find always solutions to reduce the amount of data movement in the network. • In most cases , mappers produce large amounts of intermediate data passed on to the reducers for further processing. Which leads to enormous network congestion. • One of the solutions is to reduce the mapper output using compiners “mini reducers”
  • 6. How combiners work 6 • The combiner must implement the Reducer interface’s reduce() method. • The combiner process on each map output key & value (same as reducer). • Combiner runs on the map side. • The output of the combiner passed to the reducer. • Reducers maybe used as combiners if the OP is commutative and associative. • Combiner and reducer are often identical • Combiners and reducer must have identical input and output data types. • The operation must be commutative and associative.
  • 7. Associative and commutative • The commutative property states that you can move numbers around and you still arrive at the same answer. • a+b = b+a • 1+2 =2+1 • A*B = B*A • 1*2=2*1 • The associative property states that you can regroup numbers and you will get the same answer. • (a+b)+c=a+(b+c) • (1+2)+3=1+(2+3) • (A*B)*C=A*(B*C) • (1*2)*3=1*(2*3) 7
  • 8. With and without combiner 8 Mapper 1 Mapper 2 (the,1) (the,1) (the,1) (the,1) (the,1) Sum(the ,1,1,1 ) Sum(the ,1,1) Sum(the ,1,1,1,1,1) Sum(the ,3,2 ) (The,5) (The,5)
  • 9. With and without combiner 9 Mapper 1 Mapper 2 (the,0.3 ) (the,0.4 ) (the,0.7 ) (the,0.5) (the,0.6) AVG(the ,0.3,0.4,0. 7) AVG(the ,0.5,0.6) AVG(the ,0.3,0.4,0.7,0.5,0 .6) AVG(the ,0.467,0.5 5) (The,0.5085) (The,0.5)
  • 11. Inverted index using map reduce 11
  • 12. 10/22/2024 PRESENTATION TITLE 12 Map output <The@file1, 1> <Today@file1, 1> <Today@file1, 1> <Today@file1, 1> <The@file2, 1> <Today@file2, 1>
  • 13. 10/22/2024 PRESENTATION TITLE 13 Combiner input & output <The@file1, (1)> <Today@file1, (1,1,1)> <The@file2, (1)> <Today@file2, (1)> <The file1:1> <Today file1:3> <The file2:1> <Today file2:1>
  • 14. 10/22/2024 PRESENTATION TITLE 14 Reducer input & output <The file1: 1, file2: 1 > <Today file1:3, file2:1 > <The 2 , (file1:1,file2:1)> <Today 2, (file1:3,file2:1)>

Editor's Notes

  • #2: We said before, that one of the motivations of dbs is that we move the processing code or jars to the data and not the data to the jar or the code.
  • #8: Sum is an associative , commutative OP
  • #9: AVG is not associative , commutative OP
  • #15: https://www.educative.io/answers/what-is-stringtokenizerhasmoretokens-in-java