Re: How long are expired values actually returned?
Thank you for your answer, I really appreciate that you want to help me. But already found out that I did something wrong in my implementation. Am 13.05.2014 02:53, schrieb Chris Lohfink: That is not expected. What client are you using and how are you setting the ttls? What version of Cassandra? --- Chris Lohfink On May 8, 2014, at 9:44 AM, Sebastian Schmidt isib...@gmail.com wrote: Hi, I'm using the TTL feature for my application. In my tests, when using a TTL of 5, the inserted rows are still returned after 7 seconds, and after 70 seconds. Is this normal or am I doing something wrong?. Kind Regards, Sebastian signature.asc Description: OpenPGP digital signature
Setting the read/write consistency globaly in the CQL3 datastax java driver
Hi, I'm using the CQL3 Datastax Cassandra Java client. I want to use a global read and write consistency for my queries. I know that I can set the consistencyLevel for every single prepared statement. But I want to do that just once per cluster or once per session. Is that possible? Kind Regards, Sebastian signature.asc Description: OpenPGP digital signature
Re: How long are expired values actually returned?
Ah thank you! Am 12.05.2014 16:31, schrieb Peter Reilly: You need to set grace period as well. Peter On Thu, May 8, 2014 at 8:44 AM, Sebastian Schmidt isib...@gmail.com mailto:isib...@gmail.com wrote: Hi, I'm using the TTL feature for my application. In my tests, when using a TTL of 5, the inserted rows are still returned after 7 seconds, and after 70 seconds. Is this normal or am I doing something wrong?. Kind Regards, Sebastian signature.asc Description: OpenPGP digital signature
How long are expired values actually returned?
Hi, I'm using the TTL feature for my application. In my tests, when using a TTL of 5, the inserted rows are still returned after 7 seconds, and after 70 seconds. Is this normal or am I doing something wrong?. Kind Regards, Sebastian signature.asc Description: OpenPGP digital signature
Creating a CQL3 storage layout with row key, column key and column value
Hi, I want to create a storage layout with CQL3 like this: row_key should be my row key column_key should by my column key column_value should be the value saved for the column key How can I achieve this? I figured that doing this: CREATE TABLE table_name (row_key BLOB, column_key BLOB, column_value BLOB, PRIMARY KEY (row_key, column_key)); would make column value unique for each row key. But I want to store multiple key/value pairs per row. How can I do that with CQL3? Kind regards, Sebastian
Re: Creating a CQL3 storage layout with row key, column key and column value
Thank you very much for your help :) Am 23.04.2014 16:47, schrieb DuyHai Doan: The schema you just showed allows, for one row key (partition key), to have several distinct pairs of column_key/column_value. And that's exactly what you want ... On Wed, Apr 23, 2014 at 4:44 PM, Sebastian Schmidt isib...@gmail.com mailto:isib...@gmail.com wrote: Hi, I want to create a storage layout with CQL3 like this: row_key should be my row key column_key should by my column key column_value should be the value saved for the column key How can I achieve this? I figured that doing this: CREATE TABLE table_name (row_key BLOB, column_key BLOB, column_value BLOB, PRIMARY KEY (row_key, column_key)); would make column value unique for each row key. But I want to store multiple key/value pairs per row. How can I do that with CQL3? Kind regards, Sebastian
Re: Creating a CQL3 storage layout with row key, column key and column value
And now, when I create an index on column_value. Will the column_value still be stored with the column_key or will Cassandra create an extra column? Am 23.04.2014 16:47, schrieb DuyHai Doan: The schema you just showed allows, for one row key (partition key), to have several distinct pairs of column_key/column_value. And that's exactly what you want ... On Wed, Apr 23, 2014 at 4:44 PM, Sebastian Schmidt isib...@gmail.com mailto:isib...@gmail.com wrote: Hi, I want to create a storage layout with CQL3 like this: row_key should be my row key column_key should by my column key column_value should be the value saved for the column key How can I achieve this? I figured that doing this: CREATE TABLE table_name (row_key BLOB, column_key BLOB, column_value BLOB, PRIMARY KEY (row_key, column_key)); would make column value unique for each row key. But I want to store multiple key/value pairs per row. How can I do that with CQL3? Kind regards, Sebastian
Re: Creating a CQL3 storage layout with row key, column key and column value
Yes I mean a secondary index. For example: CREATE INDEX index_name ON table_name(column_value); Am 23.04.2014 17:01, schrieb DuyHai Doan: What do you mean by index on column_value ? Do you mean secondary index ? On Wed, Apr 23, 2014 at 4:52 PM, Sebastian Schmidt isib...@gmail.com mailto:isib...@gmail.com wrote: And now, when I create an index on column_value. Will the column_value still be stored with the column_key or will Cassandra create an extra column? Am 23.04.2014 16:47, schrieb DuyHai Doan: The schema you just showed allows, for one row key (partition key), to have several distinct pairs of column_key/column_value. And that's exactly what you want ... On Wed, Apr 23, 2014 at 4:44 PM, Sebastian Schmidt isib...@gmail.com mailto:isib...@gmail.com wrote: Hi, I want to create a storage layout with CQL3 like this: row_key should be my row key column_key should by my column key column_value should be the value saved for the column key How can I achieve this? I figured that doing this: CREATE TABLE table_name (row_key BLOB, column_key BLOB, column_value BLOB, PRIMARY KEY (row_key, column_key)); would make column value unique for each row key. But I want to store multiple key/value pairs per row. How can I do that with CQL3? Kind regards, Sebastian
Re: Deleting column names
From my understanding, this would delete all entries with the given s. Meaning, if I have inserted (sa, p1, o1, c1) and (sa, p2, o2, c2), executing this: DELETE FROM table_name WHERE s = sa AND p = p1 AND o = o1 AND c = c1 would delete sa, p1, o1, c1, p2, o2, c2. Is this correct? Or does the above statement only delete p1, o1, c1? 2014-04-22 4:00 GMT+02:00 Steven A Robenalt srobe...@stanford.edu: Is there a reason you can't use: DELETE FROM table_name WHERE s = ? AND p = ? AND o = ? AND c = ?; On Mon, Apr 21, 2014 at 6:51 PM, Eric Plowe eric.pl...@gmail.com wrote: Also I don't think you can null out columns that are part of the primary key after they've been set. On Monday, April 21, 2014, Andreas Wagner andreas.josef.wag...@googlemail.com wrote: Hi cassandra users, hi Sebastian, I'd be interested in this ... is there any update/solution? Thanks so much ;) Andreas On 04/16/2014 11:43 AM, Sebastian Schmidt wrote: Hi, I'm using a Cassandra table to store some data. I created the table like this: CREATE TABLE IF NOT EXISTS table_name (s BLOB, p BLOB, o BLOB, c BLOB, PRIMARY KEY (s, p, o, c)); I need the at least the p column to be sorted, so that I can use it in a WHERE clause. So as far as I understand, the s column is now the row key, and (p, o, c) is the column name. I tried to delete single entries with a prepared statement like this: DELETE p, o, c FROM table_name WHERE s = ? AND p = ? AND o = ? AND c = ?; That didn't work, because p is a primary key part. It failed during preparation. I also tried to use variables like this: DELETE ?, ?, ? FROM table_name WHERE s = ?; This also failed during preparation, because ? is an unknown identifier. Since I have multiple different p, o, c combinations per s, deleting the whole row identified by s is no option. So how can I delete a s, p, o, c tuple, without deleting other s, p, o, c tuples with the same s? I know that this worked with Thrift/Hector before. Regards, Sebastian -- Steve Robenalt Software Architect HighWire | Stanford University 425 Broadway St, Redwood City, CA 94063 srobe...@stanford.edu http://highwire.stanford.edu
How to clear all data using CQL?
Hey I want to do unit tests for software that uses Cassandra as storage backend. Using the Hector client, I could just iterate over all keyspaces and delete them. In CQL, there is no query to list all keyspaces. How can I drop all Keyspaces from Cassandra, without knowing every single Keyspace name? Regards, Sebastian
Re: How to clear all data using CQL?
Thank you that worked! Am 16.04.2014 10:46, schrieb Mark Reddy: /select keyspace_name from system.schema_keyspaces;/
Deleting column names
Hi, I'm using a Cassandra table to store some data. I created the table like this: CREATE TABLE IF NOT EXISTS table_name (s BLOB, p BLOB, o BLOB, c BLOB, PRIMARY KEY (s, p, o, c)); I need the at least the p column to be sorted, so that I can use it in a WHERE clause. So as far as I understand, the s column is now the row key, and (p, o, c) is the column name. I tried to delete single entries with a prepared statement like this: DELETE p, o, c FROM table_name WHERE s = ? AND p = ? AND o = ? AND c = ?; That didn't work, because p is a primary key part. It failed during preparation. I also tried to use variables like this: DELETE ?, ?, ? FROM table_name WHERE s = ?; This also failed during preparation, because ? is an unknown identifier. Since I have multiple different p, o, c combinations per s, deleting the whole row identified by s is no option. So how can I delete a s, p, o, c tuple, without deleting other s, p, o, c tuples with the same s? I know that this worked with Thrift/Hector before. Regards, Sebastian
Deleting Row Key
Hi, per default, the key of a row is not deleted, if all columns were deleted. I tried to figure out why, but I didn't find an answer, except that it is 'intended'. Why is that intended? And is there a possibility to manually delete the row key? Regards Sebastian
Re: Deleting Row Key
Am 06.10.2013 00:00, schrieb Cem Cayiroglu: It will be deleted after a compaction. Sent from my iPhone On 05 Oct 2013, at 07:29, Sebastian Schmidt isib...@gmail.com wrote: Hi, per default, the key of a row is not deleted, if all columns were deleted. I tried to figure out why, but I didn't find an answer, except that it is 'intended'. Why is that intended? And is there a possibility to manually delete the row key? Regards Sebastian Okay, thanks. Can I manually start the compaction process?