You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by ROGER PUIG GANZA <rp...@tid.es> on 2010/04/21 12:20:28 UTC

problem with get_key_range in cassandra 0.4.1

Hi all.
I'm benchmarking several  nosql datastores and I'm going nuts with Cassandra.
The version of Cassandra we are using is 0.4.1 I know 0.4.1 is a bit outdated but my implementation is done with that version.


The thing is that every time the test runs, I need to reset the data inside the datastore to try with different workloads.
Easy on mysql with a trunc sentence.
I need to delete all columns on each columnFamily. What I do is getting all the keys with get_key_range and iterating over the list  and removing them.
Like that:

List<String> keys = client.get_key_range(keyspace, columnFamily, min_value, max_value, count, defaultConsistencyLevel);
            Iterator<String> iterator = keys.iterator();
            String key;
            while (iterator.hasNext()) {
                  key = iterator.next();
                  client.remove(keyspace, key, path, time, defaultConsistencyLevel);
}

The problem is: client.get_key_range throws Internal error processing get_key_range

My questions are: is there any workaround?
                                                Am I missing any configuration setting which could help me?


Thank you very much in advance
Roger Puig Ganza


Re: problem with get_key_range in cassandra 0.4.1

Posted by Jonathan Ellis <jb...@gmail.com>.
first, upgrade to 0.6.1.

second, the easiest way to wipe everything is at the fs level like Mark said.

On Wed, Apr 21, 2010 at 5:20 AM, ROGER PUIG GANZA <rp...@tid.es> wrote:
> Hi all.
>
> I’m benchmarking several  nosql datastores and I’m going nuts with
> Cassandra.
>
> The version of Cassandra we are using is 0.4.1 I know 0.4.1 is a bit
> outdated but my implementation is done with that version.
>
>
>
>
>
> The thing is that every time the test runs, I need to reset the data inside
> the datastore to try with different workloads.
>
> Easy on mysql with a trunc sentence.
>
> I need to delete all columns on each columnFamily. What I do is getting all
> the keys with get_key_range and iterating over the list  and removing them.
>
> Like that:
>
>
>
> List<String> keys = client.get_key_range(keyspace, columnFamily, min_value,
> max_value, count, defaultConsistencyLevel);
>
>             Iterator<String> iterator = keys.iterator();
>
>             String key;
>
>             while (iterator.hasNext()) {
>
>                   key = iterator.next();
>
>                   client.remove(keyspace, key, path, time,
> defaultConsistencyLevel);
>
> }
>
>
>
> The problem is: client.get_key_range throws Internal error processing
> get_key_range
>
>
>
> My questions are: is there any workaround?
>
>                                                 Am I missing any
> configuration setting which could help me?
>
>
>
>
>
> Thank you very much in advance
>
> Roger Puig Ganza
>
>

RE: problem with get_key_range in cassandra 0.4.1

Posted by Mark Jones <MJ...@imagehawk.com>.
Stop the program, wipe the data dir and commit logs, start the program, it's what I'm doing.

I even made a script that will do it so it's just a one line command.

From: ROGER PUIG GANZA [mailto:rpuig@tid.es]
Sent: Wednesday, April 21, 2010 5:20 AM
To: cassandra-user@incubator.apache.org
Subject: problem with get_key_range in cassandra 0.4.1

Hi all.
I'm benchmarking several  nosql datastores and I'm going nuts with Cassandra.
The version of Cassandra we are using is 0.4.1 I know 0.4.1 is a bit outdated but my implementation is done with that version.


The thing is that every time the test runs, I need to reset the data inside the datastore to try with different workloads.
Easy on mysql with a trunc sentence.
I need to delete all columns on each columnFamily. What I do is getting all the keys with get_key_range and iterating over the list  and removing them.
Like that:

List<String> keys = client.get_key_range(keyspace, columnFamily, min_value, max_value, count, defaultConsistencyLevel);
            Iterator<String> iterator = keys.iterator();
            String key;
            while (iterator.hasNext()) {
                  key = iterator.next();
                  client.remove(keyspace, key, path, time, defaultConsistencyLevel);
}

The problem is: client.get_key_range throws Internal error processing get_key_range

My questions are: is there any workaround?
                                                Am I missing any configuration setting which could help me?


Thank you very much in advance
Roger Puig Ganza