Home > Appengine, Articles > Appengine – Efficiently delete data with MapReduce

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.
About these ads
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: