Don't try to delete anything with __ at the beginning; those are GAE
special administrative kinds.

Jeff

On Tue, Sep 18, 2012 at 6:59 AM, Aswath Satrasala
<aswath.satras...@gmail.com> wrote:
> "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 google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to