What is Hadoop MapReduce?

Have a Database Problem? Speak with an Expert for Free
Get Started >>


When you’re working with huge sets of data, you need the right tools for the job. One key tool that has transformed the way big data is processed is the Hadoop MapReduce framework. In this article, we’ll provide an overview of MapReduce and discuss the basic workflow for the framework.

What is Hadoop MapReduce?

Hadoop MapReduce is a framework designed for processing large data sets. The concept behind the framework is simple, yet powerful: You first map your data into key-value pairs, then you reduce the dataset by combining all values that has an equivalent key associated with it. Data can be processed in a distributed manner over a number of machines.

Understanding the Workflow

A typical workflow for MapReduce requires the use of two scripts: a script for mapping and a script for reducing. At the start of a MapReduce workflow, the framework splits up the input into chunks, sending each chunk to a different machine. At this point, each machine will then run the map script on the segment of data that was passed to it.

A basic map script will take some data as input and map it to key-value pairs based on your particular specifications. As an example, let’s imagine a script that counts the frequency of words in a given text. Each key-value pair would have a word as its key and that word’s count as its value. The map script would generate a key-value pair with a key of word and a value of “1” for every single word in the script. Notice that the map script isn’t actually tallying up the count for each word in the text– that’s the reducer script’s job. All the map script does is take the input data and transform it into key-value pairs for the reducer script.

When the map script has finished generating all the key-value pairs, the pairs are grouped by their keys. This allows an entire group to be passed to one machine, which will then run the reducer script on that group of key-value pairs.

The reducer script takes a set of key-value pairs and aggregates them based on the specifications defined in the script. For example, our word-frequency script should return a count for each word in the input text. In this case, the reducer simply needs to add up the values for a grouping of key-value pairs that share the same key.

Advantages of Using Hadoop MapReduce

There are a number of reasons to choose Hadoop MapReduce for applications that process large sets of data:

  • Scalability: Hadoop’s ability to distribute huge data sets among a large number of servers makes it a highly scalable platform. You can easily scale out by adding inexpensive servers, yet each additional machine adds extra processing power for your applications.

  • Cost: Hadoop allows you to scale to degrees that would be cost-prohibitive with a traditional relational database management system. The scale-out structure of Hadoop keeps costs in check as your dataset grows.

  • Flexibility: MapReduce works well with a wide variety of data sources, both structured and unstructured. This flexibility is key when you’re working with sources such as social media, where the data is less structured by nature.

  • Simplicity: A key advantage of using Hadoop MapReduce is that it’s based on a relatively simple programming model. This makes it easier for developers to create MapReduce programs quickly and efficiently. MapReduce programs can also be written in Java, which is a popular language that’s not difficult to pick up; this also makes it easier to find developers to write the programs you need.


There’s no doubt that Hadoop MapReduce can help you get a handle on even the largest datasets. The framework’s flexibility, scalability and speed make it an efficient and cost-effective solution for organizations with a lot of data to crunch. Although this article is merely an overview of the Hadoop MapReduce framework, it can serve as a great starting point for further research.

Pilot the ObjectRocket Platform Free!

Try Fully-Managed CockroachDB, Elasticsearch, MongoDB, PostgreSQL (Beta) or Redis.

Get Started

Keep in the know!

Subscribe to our emails and we’ll let you know what’s going on at ObjectRocket. We hate spam and make it easy to unsubscribe.