How do I get the values from the counter after I processed all the records with Google AppEngine MapReduce?
Or am I missing the use case for counters here?
Sample Code from http://code.google.com/p/appengine-mapreduce/wiki/UserGuidePython
How would I retrieve the value of counter counter1 when the mapreduce is done?
app.yaml
handlers:
- url: /mapreduce(/.*)?
script: mapreduce/main.py
login: admin
mapreduce/main.py
from mapreduce import operation as op
def process(entity):
yield op.counters.Increment("counter1")
mapreduce.yaml
mapreduce:
- name: <Some descriptive name for UI>
mapper:
input_reader: mapreduce.input_readers.DatastoreInputReader
handler: main.process
params:
- name: entity_kind
default: <your entity name, e.g. main.MyEntity>