Carl
Carl

Reputation: 147

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

Upvotes: 5

Views: 1838

Answers (2)

Khalid
Khalid

Reputation: 704

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.

Upvotes: 1

Dave W. Smith
Dave W. Smith

Reputation: 24966

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.

Upvotes: 7

Related Questions