The realization principle of chainmapper/chainreducer

Source: Internet
Author: User

Chainmapper/chainreducer is mainly designed to solve the linear chain-type mapper. That is, there are multiple mapper in the MAP or REDUCE phase, these mapper like the Linux pipeline, the output of the previous mapper is redirected directly to the input of the next mapper, forming a pipelined form similar to [Map+reduce map* ]。 Figure 1 shows a typical chainmapper/chainreducer scenario: in the map phase, the data is processed sequentially through Mapper1 and Mapper2, and in the reduce phase, after the data is shuffle and sort , which is processed by the corresponding reducer, but reducer is not written directly to HDFs, but is handed to another mapper processing, and the resulting results are written to the final HDFs output directory.

Figure 1 Chainmapper/chainreducer Application Example

It is important to note that for any mapreduce job, the MAP and reduce phases can have an unlimited number of mapper, but Reducer can only have one. In other words, the computational process shown in Figure 2 cannot be done using chainmapper/chainreducer, but it needs to be decomposed into two mapreduce jobs.

Figure 21 scenarios where a chainmapper/chainreducer is not applicable

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.