You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Ca...@ibs-ag.com on 2014/11/26 04:55:29 UTC
Advice for recursive delete?
Hi, We just loaded up M19 and the new M26 API.. everything working great so far. Thanks!!!
We're looking to recursively delete entries from an arbitrary point in the directory.
After some testing to users, we want to programmatically reload portions of the tree from a known good running instance.
Before we do this, we must delete everything from below a certain OU, including nested OU's and user entries.
We have a good solution to reload the system but no elegant way of recursively deleting.
Any ideas are appreciated.
Thank you,
Carlo Accorsi
Re: Advice for recursive delete?
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 26/11/14 05:49, Carlo.Accorsi@ibs-ag.com a écrit :
> Thanks Kiran.. exactly what we needed!
Once upon a time, we had the Cascade Control implemented in the server.
This does exactly what you need : delete recursively all the entries
from a starting point.
We have decomissioned it, but at some point, it would be good to have it
working again.
May be a JIRA could help !
RE: Advice for recursive delete?
Posted by Ca...@ibs-ag.com.
Thanks Kiran.. exactly what we needed!
-----Original Message-----
From: Kiran Ayyagari [mailto:kayyagari@apache.org]
Sent: Tuesday, November 25, 2014 11:18 PM
To: users@directory.apache.org
Subject: Re: Advice for recursive delete?
On Wed, Nov 26, 2014 at 11:55 AM, <Ca...@ibs-ag.com> wrote:
> Hi, We just loaded up M19 and the new M26 API.. everything working
> great so far. Thanks!!!
>
> perfect :)
> We're looking to recursively delete entries from an arbitrary point in
> the directory.
> After some testing to users, we want to programmatically reload
> portions of the tree from a known good running instance.
> Before we do this, we must delete everything from below a certain OU,
> including nested OU's and user entries.
> We have a good solution to reload the system but no elegant way of
> recursively deleting.
>
> see the deleteRecursive() method in ReplicationConsumerImpl[1] this
> uses
SortControl to delete the entries
without opening multiple cursors.
You can reuse that code after removing all the replication related parts.
[1]
http://svn.apache.org/repos/asf/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java
> Any ideas are appreciated.
> Thank you,
> Carlo Accorsi
>
>
>
--
Kiran Ayyagari
http://keydap.com
Re: Advice for recursive delete?
Posted by Kiran Ayyagari <ka...@apache.org>.
On Wed, Nov 26, 2014 at 11:55 AM, <Ca...@ibs-ag.com> wrote:
> Hi, We just loaded up M19 and the new M26 API.. everything working great
> so far. Thanks!!!
>
> perfect :)
> We're looking to recursively delete entries from an arbitrary point in the
> directory.
> After some testing to users, we want to programmatically reload portions
> of the tree from a known good running instance.
> Before we do this, we must delete everything from below a certain OU,
> including nested OU's and user entries.
> We have a good solution to reload the system but no elegant way of
> recursively deleting.
>
> see the deleteRecursive() method in ReplicationConsumerImpl[1] this uses
SortControl to delete the entries
without opening multiple cursors.
You can reuse that code after removing all the replication related parts.
[1]
http://svn.apache.org/repos/asf/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java
> Any ideas are appreciated.
> Thank you,
> Carlo Accorsi
>
>
>
--
Kiran Ayyagari
http://keydap.com