cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Gallamore <mike.e.gallam...@googlemail.com>
Subject problem with Net::Cassanda::Easy deleting columns
Date Tue, 06 Apr 2010 20:08:54 GMT
Hello I tried to post this earlier but something seems to have gone wrong
with sending the message.

I have a test perl script that I'm using to test the behaviour of some of my
existing code. It is important that the values start in  a clean state at
the beginning of the tests, as I'm incrementing values, checking "scores"
etc during the test and need to test that the values I expect are actually
what gets stored. To try to clear this I'm using the following
Net::Cassandra::Easy call (its a perl thrift wrapper):

        $rc = $c->mutate([$key], family => 'Standard1', deletions => {
byname => ['value']});

The perl module is pretty poorly documented as are all the other ones I've
looked at (if someone has a better one to use I'd be interested).
Particularly the examples show that something like this is to be used to
delete a supercolumn from a key, but there is no examples of regular columns
or how to delete a whole key "row" from the datastore. Really all my code
cares is that the value comes back undefined until the test has actually
added a value for the "value" column.

When I run the code java/cassandra barfs and the test dies (cassandra seems
to keep running happily other than the exception dumps). Here is what
cassandra dumps out to the terminal (running bin/cassandra -f for the test):

darth@vader$ bin/cassandra -f
ERROR 13:01:43,301 Error in ThreadPoolExecutor
java.lang.RuntimeException: java.lang.UnsupportedOperationException: This
operation is not supported for Super Columns.
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:34)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.UnsupportedOperationException: This operation is not
supported for Super Columns.
at org.apache.cassandra.db.SuperColumn.timestamp(SuperColumn.java:137)
at
org.apache.cassandra.db.ColumnSerializer.serialize(ColumnSerializer.java:65)
at
org.apache.cassandra.db.ColumnSerializer.serialize(ColumnSerializer.java:29)
at
org.apache.cassandra.db.ColumnFamilySerializer.serializeForSSTable(ColumnFamilySerializer.java:87)
at
org.apache.cassandra.db.ColumnFamilySerializer.serialize(ColumnFamilySerializer.java:73)
at
org.apache.cassandra.db.RowMutationSerializer.freezeTheMaps(RowMutation.java:334)
at
org.apache.cassandra.db.RowMutationSerializer.serialize(RowMutation.java:346)
at
org.apache.cassandra.db.RowMutationSerializer.serialize(RowMutation.java:319)
at
org.apache.cassandra.db.RowMutation.getSerializedBuffer(RowMutation.java:275)
at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:200)
at
org.apache.cassandra.service.StorageProxy$3.runMayThrow(StorageProxy.java:310)
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
... 3 more
ERROR 13:01:43,308 Fatal exception in thread
Thread[ROW-MUTATION-STAGE:3,5,main]
java.lang.RuntimeException: java.lang.UnsupportedOperationException: This
operation is not supported for Super Columns.
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:34)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.UnsupportedOperationException: This operation is not
supported for Super Columns.
at org.apache.cassandra.db.SuperColumn.timestamp(SuperColumn.java:137)
at
org.apache.cassandra.db.ColumnSerializer.serialize(ColumnSerializer.java:65)
at
org.apache.cassandra.db.ColumnSerializer.serialize(ColumnSerializer.java:29)
at
org.apache.cassandra.db.ColumnFamilySerializer.serializeForSSTable(ColumnFamilySerializer.java:87)
at
org.apache.cassandra.db.ColumnFamilySerializer.serialize(ColumnFamilySerializer.java:73)
at
org.apache.cassandra.db.RowMutationSerializer.freezeTheMaps(RowMutation.java:334)
at
org.apache.cassandra.db.RowMutationSerializer.serialize(RowMutation.java:346)
at
org.apache.cassandra.db.RowMutationSerializer.serialize(RowMutation.java:319)
at
org.apache.cassandra.db.RowMutation.getSerializedBuffer(RowMutation.java:275)
at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:200)
at
org.apache.cassandra.service.StorageProxy$3.runMayThrow(StorageProxy.java:310)
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
... 3 more

Anyone have an idea of what would cause this? Importantly: I don't
necessarily know that the value exists in Cassandra before I want to delete
it, I want more of a "delete if exists" kind of behaviour. The end result
should be if the key exists the column gets removed or the row continues to
not exist. Ideally I would delete the whole row (there is only one column at
the moment but in the future there will be more than one so manually
deleting the value for each of the columns is a bit of a pain).

Mime
View raw message