Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8709491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:22:29+00:00 2026-06-13T04:22:29+00:00

MongoDB’s explanation of the reduce phase says: The map/reduce engine may invoke reduce functions

  • 0

MongoDB’s explanation of the reduce phase says:

The map/reduce engine may invoke reduce functions iteratively; thus,
these functions must be idempotent.

This is how I always understood reduce to work in a general map reduce environment.
Here you could sum values across N machines by reducing the values on each machine, then sending those outputs to another reducer.

Wikipedia says:

The framework calls the application’s Reduce function once for each
unique key in the sorted order. The Reduce can iterate through the
values that are associated with that key and produce zero or more
outputs.

Here you would need to move all values (with the same key) to the same machine to be summed. Moving data to the function seems to be the opposite of what map reduce is supposed to do.

Is Wikipedia’s description too specific? Or did MongoDB break map-reduce? (Or am I missing somethieng here?)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:22:30+00:00Added an answer on June 13, 2026 at 4:22 am

    This is how the original Map Reduce framework was described by Google:

    2 Programming Model

    […]

    The intermediate values are supplied to the user’s reduce function via an iterator. This allows us to handle lists of values that are too large to fit in memory.

    And later:

    3 Implementation

    […]

    6. The reduce worker iterates over the sorted intermediate data and for each unique intermediate key encountered, it passes the key and the corresponding set of intermediate values to the user’s Reduce function.

    So there is only one invocation of Reduce. The problem of moving a lot of small intermediate pairs is addressed by using special combiner function locally:

    4.3 Combiner Function

    In some cases, there is significant repetition in the intermediate keys produced by each map task […] We allow the user to specify an optional Combiner function that does partial merging of this data before it is sent over the network.

    The Combiner function is executed on each machine that performs a map task. Typically the same code is used to implement both the combiner and the reduce functions. […]

    Partial combining significantly speeds up certain classes of MapReduce operations.

    TL;DR

    Wikipedia follows original MapReduce design, MongoDB designers taken a slightly different approach.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The MongoDB sorting functions are pretty neato. Can you use them on objects and/or
MongoDB in Action book says: Imagine you issue a write to the primary node
Mongodb Database: {thread: abc, message: hjhjh, Date: (2010,4,5,0,0,0)} {thread: abc, message: hjhjh, Date: (2009,3,5,0,0,0)}
in MongoDb I can pass a predicate to an queryable instance for example DataBase.GetCollection<BsonDocument>(entity)
In MongoDB I have a query which looks like this to find out for
In mongodb, is there a way to ask for the length of a subfield
is mongodb appropriate for sites like stackoverflow?
Using MongoDB C# driver ( http://github.com/samus/mongodb-csharp ), seems that I'm unable to get the
Following MongoDB documentation example seems to be wrong. Any suggestion? a== 1 and a
Using MongoDB, I'm having trouble adding en element to an Array when the array

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.