Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete namespace from App Engine (Java)

Does anyone know if it possible to delete a namespace i App Engine?

I can iterate over all namespaces but would like to erase a namespace when it is no longer in use.

Thanks, Carl

like image 251
Carl Avatar asked Sep 09 '11 08:09

Carl


2 Answers

A namespace is a property of an entity key. Deleting the namespace really means finding and deleting everything in a given namespace. http://code.google.com/appengine/docs/python/datastore/metadataqueries.html lays out the details. Basically, you determine the namespace you want to clear out, switch to it, then nuke the entities there.

If a namespace has a lot of entities, consider using the mapreduce framework (http://code.google.com/p/appengine-mapreduce/) to parcel the work up into chunks that will run without timing out.

like image 189
Dave W. Smith Avatar answered Sep 30 '22 16:09

Dave W. Smith


If you delete all the entities, the namespace should be deleted. If the empty namespace appears to be showing up in Admin Console, this could happen due to some metadata entries being left in the namespace. The newer Cloud Console will not show the empty namespace. In order to get the namespace to disappear completely from the drop-down menu of the old Admin Console please refresh the page after removing all namespace entities.

like image 32
Khalid Avatar answered Sep 30 '22 15:09

Khalid