incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Moses Dinakaran <mosesdinaka...@gmail.com>
Subject Query on delete a column inside a super column
Date Tue, 06 Jul 2010 12:41:55 GMT
Hi All,

I have a query related to deleting a column inside a super column

The following is my cassandra schema

[cache_pages_key_hash] => Array
        (
            [hash_1] => Array
                (
                    [1] => 4c330e95195f9
                    [2] => 4c330e951f18b
                    [3] => 4c330e9521f3d
                )

        )


No I wanted to remove the index [1] => 4c330e95195f9 from the
supercolumn [hash_1]

Through phpCassa I am doing the following

$updatedRecord   =  array("hash_1" => Array
                                (
                                    2 => "4c330e951f18b"
                                    3 => "4c330e9521f3d"
                               )
                             )


$cassandraInstance->insert('cache_pages_key_hash',$updateRecord );

But while I fetch the record again

I was getting the original records ie the column 1 is not removed from


[cache_pages_key_hash] => Array
        (
            [hash_1] => Array
                (
                    [1] => 4c330e95195f9
                    [2] => 4c330e951f18b
                    [3] => 4c330e9521f3d
                )

        )


But at the same time If I am updating the index 1

ie
$updateRecord   =  array("hash_1" => Array
                                (
                                   1  => ' able to update'
                                    2 => "4c330e951f18b"
                                    3 => "4c330e9521f3d"
                               )
                             )

$cassandraInstance->insert('cache_pages_key_hash',$updateRecord );

The records is being updated, Only problem is that  deleting dosent happens.

My question is that is this behavior is expected as explained in the article
Distributed deletes in the Cassandra database
http://spyced.blogspot.com/2010/02/distributed-deletes-in-cassandra.html

or I am doing wrong.


Thanks,
Moses.

Mime
View raw message