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
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.
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.
精彩评论