Appengine – Efficiently delete data with MapReduce
The new method: The new (easier) way is to delete data is the builtin datastore-admin.
The traditional mapreduce method: The mapreduce-technique won’t affect the latency of your application, but be careful with your quotas. You can also filter out entities you don’t want to delete in the clearmodel.process method.
(1) Get MapReduce for AppEngine and check it out …
svn checkout http://appengine-mapreduce.googlecode.com/svn/trunk/ appengine-mapreduce-read-only(2) If you use AppEngine with python go to the
python/src/ directory and copy the mapreduce subdirectory into the root directory of your app engine project.(3) Then create download
mapreduce.yaml file in the root folder of your appengine-project (same folder where your app.yaml is). Edit this file an set your model you want to clear after default: at the last line of the file.(4) Get the file clearmodel.py and put it into the
mapreduce subdirectory.(5) Install mapreduce in the app.yaml
(6) Navigate to <baseurl>/mapreduce and login with your Appengine-User. You can start the clear-process with the webinterface.