mapreduce problem?

70 views
Skip to first unread message

Danny B

unread,
Aug 16, 2011, 10:54:28 AM8/16/11
to google-a...@googlegroups.com
For some reason my app is running mapreduce once an hour.  Is this normal? lol  "/_ah/datastore_admin/mapreduce_done" is the uri being run, and every time it runs it throws the following error:

'NoneType' object has no attribute 'mapreduce_spec'
Traceback (most recent call last):
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 703, in __call__
    handler.post(*groups)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/datastore_admin/utils.py", line 351, in post
    mapreduce_state.mapreduce_spec.params[ 
AttributeError: 'NoneType' object has no attribute 'mapreduce_spec'

Any ideas what is going on?

Tim Hoffman

unread,
Aug 16, 2011, 11:01:28 AM8/16/11
to google-a...@googlegroups.com
Hi

I have no idea, what you are doing, but looking at the code.

mapreduce_state is defined a few lines earlier in the post method (utils.py) by 

mapreduce_id = self.request.headers['Mapreduce-Id']
mapreduce_state = model.MapreduceState.get_by_job_id(mapreduce_id)

And it doesn't get to this code if "Mapreduce-Id' isn't in headers, however mapreduce_state is None
so the get_by_job_id call is returning None.  So your mapreduce_id doesn't resolve to anything.

Hope this helps

T

Danny B

unread,
Aug 16, 2011, 11:13:09 AM8/16/11
to google-a...@googlegroups.com
I am not even using mapreduce in my code...

Tim Hoffman

unread,
Aug 16, 2011, 11:18:04 AM8/16/11
to google-a...@googlegroups.com
So who/what is calling that handler. You should see it in your logs.
If its running every hour do you have a cron job ?

Try tracking down the IP of the requester.

I didn't realize you wheren't actually using mapreduce - sorry

T

Danny B

unread,
Aug 16, 2011, 11:36:20 AM8/16/11
to google-a...@googlegroups.com
No there are no cron jobs or backends, however when I just checked task queues there is one listed there, yet I have never set one up...lol.  I'll try deleting it and seeing if that stops whatever craziness is going on.  Still not sure how that would have been scheduled though and I am the only person with access to that.

The only thing I have done recently within the admin panel was delete an entity kind from the datastore admin panel.  I only did it once and don't remember it saying it was going to setup a task queue to run every hour.  Is that panel not for just pruning out a whole entity kind quick and easy?

Tim Hoffman

unread,
Aug 16, 2011, 12:05:27 PM8/16/11
to google-a...@googlegroups.com
HI Danny

I am pretty sure bulk deletes through the admin panel use mapreduce behind the scenes.  You might have millions of records.


Rgds

T
Reply all
Reply to author
Forward
0 new messages