"Hi,
I am struggling to clear up my unused namespaces. The datastore admin
console does not provide this feature.
I am using the following code. This is assumed that the namespace has few
entities, and hopefully will execute with in the 1min appengine time limit.
String oldNamespace = NamespaceManager.get();
try {
NamespaceManager.set(namespaceToDelete);
DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
Query q = new Query().setKeysOnly();
final ArrayList<com.google.appengine.api.datastore.Key> keys =
new ArrayList<com.google.appengine.api.datastore.Key>();
for (final Entity entity: ds.prepare(q).asIterable()) {
keys.add(entity.getKey());
}
ds.delete(keys);
} finally {
NamespaceManager.set(oldNamespace);
}
*
*
*I get the following error*
*"illegal key.path.element.type: __Stat_Ns_Kind_CompositeIndex__"*
Any pointers will be appreciated.
-Aswath
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.