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 7723485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:27:19+00:00 2026-06-01T04:27:19+00:00

I’m ready to rock and roll with my little mapreduce routine (Python, Google Appengine),

  • 0

I’m ready to rock and roll with my little mapreduce routine (Python, Google Appengine), but I’m nervous about having some bug that will infect my database table. My processing function looks like this:

def promote(nrhp_aux_entity):
      ...
      # I form a query, and use it to get an "nrhp_record". That's the item
      # I'm actually changing
      results1 = query1.fetch(limit=1)
      nrhp_record = results1[0]
      ...
      yield op.db.Put(np_record)

I’d like to have it run on just a small number of nrhp_aux_entity objects, and then just exit. Then I can look over the results and decide to let it work on the whole table. So would a good plan be to have a global counter of some sort, and then exit the whole mapreduce, when say, the counter gets to some small number, like 5? And if so, what’s a good way to implement the global counter?

And if I do this, I expect my mapreduce will be all finished in just a minute or so, right, since it only is operating on 5 entities in my database table, (which contains about 76,000 entities)?

  • 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-01T04:27:20+00:00Added an answer on June 1, 2026 at 4:27 am

    I would copy a few entities to a new kind and set the mapper going on that new kind. Implementing a counter that works at high contention is harder than just making a separate test environment, and the test environment has the benefit of not working on any real data.

    Google also just released useful backup / restore features you might want to use before setting your mapper loose on all of your production data!

    Depending on your queue settings and how long a single mapping task takes, I would expect a mapreduce over 5 entities to take very little time. Like… 200ms.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

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.