You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Ran Tavory <ra...@gmail.com> on 2010/04/28 10:59:28 UTC

Re: how to delete data

Finally I found the time to start this work...
It's half baked, but I listed all the missing parts so I'll continue the
work if the patch is good so far. No need to apply the patch, just have look
and lmk if I'm at the right direction
https://issues.apache.org/jira/secure/attachment/12443055/CASSANDRA-531.patch

<https://issues.apache.org/jira/secure/attachment/12443055/CASSANDRA-531.patch>
Thanks

On Thu, Mar 25, 2010 at 9:32 PM, Jonathan Ellis <jb...@gmail.com> wrote:

> Commented on the Jira issue.
>
> Curious how badly out of date that patch is now. :)
>
> On Wed, Mar 24, 2010 at 12:55 PM, Ran Tavory <ra...@gmail.com> wrote:
> > I'm willing to give it a try.
> > Where do I start, except for applying the patch in the bug?
> >
> > On Wed, Mar 24, 2010 at 2:30 PM, Jonathan Ellis <jb...@gmail.com>
> wrote:
> >>
> >> Currently there is no good way to do this.  We're planning to add
> >> "truncate" support in
> >> https://issues.apache.org/jira/browse/CASSANDRA-531, let me know if
> >> you want to work on that. :)
> >>
> >> -Jonathan
> >>
> >> On Wed, Mar 24, 2010 at 4:03 AM, Ran Tavory <ra...@gmail.com> wrote:
> >> > What's the recommended way to delete data?
> >> > For example, I want to wipe out an entire column family data from disk
> >> > with
> >> > minimal effort.
> >> > I could:
> >> >
> >> > stop all hosts in the cluster
> >> > restart them until they finish playing commit logs
> >> > stop them again
> >> > delete all CF related files in my data directory at every node
> >> > start cluster again
> >> > ... but this is tedious. is there a nicer way?
> >> >
> >
> >
>

Re: how to delete data

Posted by Ran Tavory <ra...@gmail.com>.
I've added the JMX work to StorageService and NodeTool so this work is done,
ready for final review, thanks

https://issues.apache.org/jira/secure/attachment/12443404/CASSANDRA-531.patch

On Sun, May 2, 2010 at 12:05 AM, Ran Tavory <ra...@gmail.com> wrote:

> alright, I've uploaded another patch with these updates:
>
>
> https://issues.apache.org/jira/secure/attachment/12443391/CASSANDRA-531.patch
>
> In this patch I completed all the thrift wiring work, including internal
> messaging to all hosts in the cluster.
> The patch includes all previous changes, no need to use the previous
> patches.
> I've changed the truncate method definition in cassandra.thrift and removed
> the timestamp from the truncation signature since it's not used.
> More changes are in the patch, including system test, thrift and messaging
> implementation, taking a snapshot and deleting the actual files.
>
> TODO:
> Add truncate to the JMX interface
> Add truncate to nodetool
> Add system tests to test nodetool + JMX
>
>
> On Wed, Apr 28, 2010 at 2:53 PM, Gary Dusbabek <gd...@gmail.com>wrote:
>
>> You bet.  Take a look at CFS.snapshot().  You basically supply a name
>> and a hard link is created.
>>
>> Gary.
>>
>> On Wed, Apr 28, 2010 at 06:49, Ran Tavory <ra...@gmail.com> wrote:
>> > Thanks Gary, can you send a code pointer how snapshot is done?
>> >
>> > On Wed, Apr 28, 2010 at 2:46 PM, Gary Dusbabek <gd...@gmail.com>
>> wrote:
>> >>
>> >> I think it's in the right direction.  You've handled the memtable,
>> >> sstables and commit log.  Other than what's listed in the todos, I
>> >> can't think of anything else.
>> >>
>> >> As for the files, it's probably best to snapshot before truncating.
>> >> That's the approach I was encouraged to take for the DROP CF
>> >> operation.
>> >>
>> >> Gary.
>> >>
>> >> On Wed, Apr 28, 2010 at 03:59, Ran Tavory <ra...@gmail.com> wrote:
>> >> > Finally I found the time to start this work...
>> >> > It's half baked, but I listed all the missing parts so I'll continue
>> the
>> >> > work if the patch is good so far. No need to apply the patch, just
>> have
>> >> > look
>> >> > and lmk if I'm at the right direction
>> >> >
>> >> >
>> https://issues.apache.org/jira/secure/attachment/12443055/CASSANDRA-531.patch
>> >> >
>> >> >
>> >> > <
>> https://issues.apache.org/jira/secure/attachment/12443055/CASSANDRA-531.patch
>> >
>> >> > Thanks
>> >> >
>> >> > On Thu, Mar 25, 2010 at 9:32 PM, Jonathan Ellis <jb...@gmail.com>
>> >> > wrote:
>> >> >
>> >> >> Commented on the Jira issue.
>> >> >>
>> >> >> Curious how badly out of date that patch is now. :)
>> >> >>
>> >
>> >
>>
>
>

Re: how to delete data

Posted by Ran Tavory <ra...@gmail.com>.
alright, I've uploaded another patch with these updates:

https://issues.apache.org/jira/secure/attachment/12443391/CASSANDRA-531.patch

In this patch I completed all the thrift wiring work, including internal
messaging to all hosts in the cluster.
The patch includes all previous changes, no need to use the previous
patches.
I've changed the truncate method definition in cassandra.thrift and removed
the timestamp from the truncation signature since it's not used.
More changes are in the patch, including system test, thrift and messaging
implementation, taking a snapshot and deleting the actual files.

TODO:
Add truncate to the JMX interface
Add truncate to nodetool
Add system tests to test nodetool + JMX


On Wed, Apr 28, 2010 at 2:53 PM, Gary Dusbabek <gd...@gmail.com> wrote:

> You bet.  Take a look at CFS.snapshot().  You basically supply a name
> and a hard link is created.
>
> Gary.
>
> On Wed, Apr 28, 2010 at 06:49, Ran Tavory <ra...@gmail.com> wrote:
> > Thanks Gary, can you send a code pointer how snapshot is done?
> >
> > On Wed, Apr 28, 2010 at 2:46 PM, Gary Dusbabek <gd...@gmail.com>
> wrote:
> >>
> >> I think it's in the right direction.  You've handled the memtable,
> >> sstables and commit log.  Other than what's listed in the todos, I
> >> can't think of anything else.
> >>
> >> As for the files, it's probably best to snapshot before truncating.
> >> That's the approach I was encouraged to take for the DROP CF
> >> operation.
> >>
> >> Gary.
> >>
> >> On Wed, Apr 28, 2010 at 03:59, Ran Tavory <ra...@gmail.com> wrote:
> >> > Finally I found the time to start this work...
> >> > It's half baked, but I listed all the missing parts so I'll continue
> the
> >> > work if the patch is good so far. No need to apply the patch, just
> have
> >> > look
> >> > and lmk if I'm at the right direction
> >> >
> >> >
> https://issues.apache.org/jira/secure/attachment/12443055/CASSANDRA-531.patch
> >> >
> >> >
> >> > <
> https://issues.apache.org/jira/secure/attachment/12443055/CASSANDRA-531.patch
> >
> >> > Thanks
> >> >
> >> > On Thu, Mar 25, 2010 at 9:32 PM, Jonathan Ellis <jb...@gmail.com>
> >> > wrote:
> >> >
> >> >> Commented on the Jira issue.
> >> >>
> >> >> Curious how badly out of date that patch is now. :)
> >> >>
> >
> >
>

Re: how to delete data

Posted by Gary Dusbabek <gd...@gmail.com>.
You bet.  Take a look at CFS.snapshot().  You basically supply a name
and a hard link is created.

Gary.

On Wed, Apr 28, 2010 at 06:49, Ran Tavory <ra...@gmail.com> wrote:
> Thanks Gary, can you send a code pointer how snapshot is done?
>
> On Wed, Apr 28, 2010 at 2:46 PM, Gary Dusbabek <gd...@gmail.com> wrote:
>>
>> I think it's in the right direction.  You've handled the memtable,
>> sstables and commit log.  Other than what's listed in the todos, I
>> can't think of anything else.
>>
>> As for the files, it's probably best to snapshot before truncating.
>> That's the approach I was encouraged to take for the DROP CF
>> operation.
>>
>> Gary.
>>
>> On Wed, Apr 28, 2010 at 03:59, Ran Tavory <ra...@gmail.com> wrote:
>> > Finally I found the time to start this work...
>> > It's half baked, but I listed all the missing parts so I'll continue the
>> > work if the patch is good so far. No need to apply the patch, just have
>> > look
>> > and lmk if I'm at the right direction
>> >
>> > https://issues.apache.org/jira/secure/attachment/12443055/CASSANDRA-531.patch
>> >
>> >
>> > <https://issues.apache.org/jira/secure/attachment/12443055/CASSANDRA-531.patch>
>> > Thanks
>> >
>> > On Thu, Mar 25, 2010 at 9:32 PM, Jonathan Ellis <jb...@gmail.com>
>> > wrote:
>> >
>> >> Commented on the Jira issue.
>> >>
>> >> Curious how badly out of date that patch is now. :)
>> >>
>
>

Re: how to delete data

Posted by Ran Tavory <ra...@gmail.com>.
Thanks Gary, can you send a code pointer how snapshot is done?

On Wed, Apr 28, 2010 at 2:46 PM, Gary Dusbabek <gd...@gmail.com> wrote:

> I think it's in the right direction.  You've handled the memtable,
> sstables and commit log.  Other than what's listed in the todos, I
> can't think of anything else.
>
> As for the files, it's probably best to snapshot before truncating.
> That's the approach I was encouraged to take for the DROP CF
> operation.
>
> Gary.
>
> On Wed, Apr 28, 2010 at 03:59, Ran Tavory <ra...@gmail.com> wrote:
> > Finally I found the time to start this work...
> > It's half baked, but I listed all the missing parts so I'll continue the
> > work if the patch is good so far. No need to apply the patch, just have
> look
> > and lmk if I'm at the right direction
> >
> https://issues.apache.org/jira/secure/attachment/12443055/CASSANDRA-531.patch
> >
> > <
> https://issues.apache.org/jira/secure/attachment/12443055/CASSANDRA-531.patch
> >
> > Thanks
> >
> > On Thu, Mar 25, 2010 at 9:32 PM, Jonathan Ellis <jb...@gmail.com>
> wrote:
> >
> >> Commented on the Jira issue.
> >>
> >> Curious how badly out of date that patch is now. :)
> >>
>

Re: how to delete data

Posted by Gary Dusbabek <gd...@gmail.com>.
I think it's in the right direction.  You've handled the memtable,
sstables and commit log.  Other than what's listed in the todos, I
can't think of anything else.

As for the files, it's probably best to snapshot before truncating.
That's the approach I was encouraged to take for the DROP CF
operation.

Gary.

On Wed, Apr 28, 2010 at 03:59, Ran Tavory <ra...@gmail.com> wrote:
> Finally I found the time to start this work...
> It's half baked, but I listed all the missing parts so I'll continue the
> work if the patch is good so far. No need to apply the patch, just have look
> and lmk if I'm at the right direction
> https://issues.apache.org/jira/secure/attachment/12443055/CASSANDRA-531.patch
>
> <https://issues.apache.org/jira/secure/attachment/12443055/CASSANDRA-531.patch>
> Thanks
>
> On Thu, Mar 25, 2010 at 9:32 PM, Jonathan Ellis <jb...@gmail.com> wrote:
>
>> Commented on the Jira issue.
>>
>> Curious how badly out of date that patch is now. :)
>>