:original_name: mrs_08_00501.html

.. _mrs_08_00501:

MapReduce Basic Principles
==========================

MapReduce is the core of Hadoop. As a software architecture proposed by Google, MapReduce is used for parallel computing of large-scale datasets (larger than 1 TB). The concepts "Map" and "Reduce" and their main thoughts are borrowed from functional programming language and also borrowed from the features of vector programming language.

Current software implementation is as follows: Specify a Map function to map a series of key-value pairs into a new series of key-value pairs, and specify a Reduce function to ensure that all values in the mapped key-value pairs share the same key.


.. figure:: /_static/images/en-us_image_0000001296750206.png
   :alt: **Figure 1** Distributed batch processing engine

   **Figure 1** Distributed batch processing engine

MapReduce is a software framework for processing large datasets in parallel. The root of MapReduce is the Map and Reduce functions in functional programming. The Map function accepts a group of data and transforms it into a key-value pair list. Each element in the input domain corresponds to a key-value pair. The Reduce function accepts the list generated by the Map function, and then shrinks the key-value pair list based on the keys. MapReduce divides a task into multiple parts and allocates them to different devices for processing. In this way, the task can be finished in a distributed environment instead of a single powerful server.

For more information, see `MapReduce Tutorial <https://hadoop.apache.org/docs/r3.1.1/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html>`__.

MapReduce structure
-------------------

As shown in :ref:`Figure 2 <mrs_08_00501__f6e8934d9ed084e648008f4be941e4ab8>`, MapReduce is integrated into YARN through the Client and ApplicationMaster interfaces of YARN, and uses YARN to apply for computing resources.

.. _mrs_08_00501__f6e8934d9ed084e648008f4be941e4ab8:

.. figure:: /_static/images/en-us_image_0000001296590594.png
   :alt: **Figure 2** Basic architecture of Apache YARN and MapReduce

   **Figure 2** Basic architecture of Apache YARN and MapReduce
