1 of 7

Sri Raghavendra Educational Institutions Society (R)

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

Sri Krishna Institute of Technology

www.skit.org.in

Title: Combiner, Partitioner

CO addressed: CO2

Course: Big Data Analytics

Presented by: Mr. P. Kiran Kumar

Department: ISE

2 of 7

2

22-08-2026

/skit.org.in

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

Sri Krishna Institute of Technology

Introduction to MapReduce

MapReduce is a programming framework used to process large amounts of data in parallel.

MapReduce Flow

Input Data

↓

Mapper

↓

Combiner

↓

Partitioner

↓

Shuffle & Sort

↓

Reducer

↓

Final Output

​

3 of 7

3

22-08-2026

/skit.org.in

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

Sri Krishna Institute of Technology

Combiner

  • Combiner is an optional optimization technique in MapReduce.
  • It works after the Mapper.
  • It performs local aggregation of intermediate key-value pairs.
  • It is also called a Local Reducer.
  • It reduces the amount of data transferred through the network.
  • It helps improve network and disk efficiency.
  • The Combiner output is intermediate data and is passed to the Reducer.

Simple Example

Mapper:

(Hadoop, 1)

(Hadoop, 1)

(Hive, 1)

​

Combiner:

(Hadoop, 2)

(Hive, 1)

4 of 7

4

22-08-2026

/skit.org.in

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

Sri Krishna Institute of Technology

Combiner Example

Word Count Example

The Mapper produces (word, 1) for each word.

The Combiner adds the counts locally.

This reduces the number of key-value pairs sent to the Reducer.

Mapper Output

(Hadoop, 1)

(Hadoop, 1)

(Session, 1)

(Session, 1)

(Session, 1)

(Hive, 1)

(Hive, 1)

Combiner Output

(Hadoop, 2)

(Session, 3)

(Hive, 2)

5 of 7

5

22-08-2026

/skit.org.in

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

Sri Krishna Institute of Technology

Partitioner

  • Partitioner works after the Map phase and before the Reduce phase.
  • It takes the intermediate key-value pairs produced by the Mapper.
  • It divides the data into partitions.
  • Each partition is sent to a particular Reducer.
  • The same key is normally sent to the same Reducer.
  • The number of partitions is equal to the number of Reducers.
  • Hadoop uses Hash Partitioner as the default.
  • Custom Partitioners can also be implemented.

6 of 7

6

22-08-2026

/skit.org.in

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

Sri Krishna Institute of Technology

Partitioner Example

Suppose the Mapper produces words such as:

  • Hadoop, Hive, Introduction, Introducing, Pig, Session

​

The Partitioner checks the first letter of each word.

Words beginning with H are sent to the same Reducer.

  • Hadoop
  • Hive

Words beginning with I are sent to another Reducer.

  • Introduction
  • Introducing

Words beginning with P are sent to another Reducer.

  • Pig

Words beginning with S are sent to another Reducer.

  • Session

7 of 7

7

22-08-2026

/skit.org.in

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

Sri Krishna Institute of Technology

Combiner vs Partitioner

Combiner

  • Performs local aggregation of Mapper output.
  • Reduces the amount of data transferred to the Reducer.
  • Helps reduce network traffic.
  • It is an optional optimization.
  • Also called a Local Reducer.

​

Partitioner

  • Divides the Mapper's intermediate data into partitions.
  • Sends each partition to a particular Reducer.
  • Ensures that the same key goes to the same Reducer.
  • The number of partitions equals the number of Reducers.
  • Hadoop uses Hash Partitioner by default.

​