ALLOW FILTERING usage

2014-03-17 Thread Kasper Middelboe Petersen
Hi, I have a table: CREATE TABLE json ( key text, group text, date timestamp, json text, PRIMARY KEY((key, group), date) ) WITH CLUSTERING ORDER BY (date DESC); This table will contain a small amount of data (only what an administrator creates by hand - a year

Re: ALLOW FILTERING usage

2014-03-17 Thread Tupshin Harper
It's the difference between reading from only the partitions that you are interested, vs reading every single partition before filtering the results. At scale, and assuming you don't actually need to read every partition, there would be a huge difference. If the model requires you to read every

Re: ALLOW FILTERING usage

2014-03-17 Thread Laing, Michael
Your second query is invalid: *Bad Request: Partition KEY part key cannot be restricted by IN relation (only the last part of the partition key can)* ml On Mon, Mar 17, 2014 at 6:56 AM, Tupshin Harper tups...@tupshin.com wrote: It's the difference between reading from only the partitions

Re: Relation between Atomic Batches and Consistency Level

2014-03-17 Thread Jonathan Lacefield
Hello, Consistency is declared at the statement level, i.e. batch level when writing, but enforced at each batch row level. My understanding is that each batch (and all of it's contents) will be controlled through a specific CL declaration. So batch A could use a CL of QUORUM while batch B

Cassandra FileNotFoundException .db file not found

2014-03-17 Thread Batranut Bogdan
Hello, A investigation on one of the nodes reveals that I am missing several .db files. I got FileNotFoundException in the logs on one node in the cluster. How can I fix this? nodetool repair doesn't seem to work in this case. Thank you.

Re: Multi-site Active-Active replication - Preparing Sites - Cluster Name and Snitch

2014-03-17 Thread Jonathan Lacefield
Hello, Please see comments under your 1) Use GossipingPropertyFileSnitc: http://www.datastax.com/documentation/cassandra/1.2/cassandra/architecture/architectureSnitchGossipPF_c.html - much easier to manage 2) All nodes in the same cluster must have the same cluster name:

Re: Relation between Atomic Batches and Consistency Level

2014-03-17 Thread Drew Kutcharian
Hi Jonathan, I’m still a bit unclear on this. Say I have two CQL3 tables: - user (replication of 3) - user_email_index (replication of 3) Now I create a new logged batch at quorum consistency level and put two inserts in there: #1 Insert into the “user table with partition key of a timeuuid of

Production Quality Ruby Driver?

2014-03-17 Thread NORD SC
Hi, I am looking for a Ruby driver that is production ready and truly supports CQL 3. Can anyone strongly recommend one in particular? I found - https://github.com/iconara/cql-rb - https://github.com/kreynolds/cassandra-cql - https://github.com/cequel/cequel Jan

Re: Relation between Atomic Batches and Consistency Level

2014-03-17 Thread Jonathan Lacefield
Hello, Have you seen this blog post, it's old but still relevant. I think it will answer your questions. http://www.datastax.com/dev/blog/atomic-batches-in-cassandra-1-2. I think the answer lies in how Cassandra defines a batch In the context of a Cassandra batch operation, atomic means

Re: Scala Driver?

2014-03-17 Thread Jan Algermissen
On 15 Mar 2014, at 19:23, Joe Stein crypt...@gmail.com wrote: Here is an example wrapper how to use the DataStax java driver in scala https://github.com/stealthly/scala-cassandra Thanks Joe, yes, better to just use the java-driver than to create a generic scala-driver it seems. Jan

Re: Exception in thread event_loop

2014-03-17 Thread Alex Popescu
Sundeep, You'll probably have better chances to get these questions answered on the Python driver group: https://groups.google.com/a/lists.datastax.com/forum/#!forum/python-driver-user 1. I'd suggest rewriting a bit the first code snippet just to get it to work first so we can eliminate other

Re: Relation between Atomic Batches and Consistency Level

2014-03-17 Thread Drew Kutcharian
I have read that blog post which actually was the source of the initial confusion ;) If I write normally (no batch) at Quorum, then a hinted write wouldn’t count as a valid write so the write wouldn’t succeed, which means I would have to retry. That’s a pretty well defined outcome. Now if I

Cassandra Caused by: UnavailableException()

2014-03-17 Thread Alaa Zubaidi (PDF)
Hi, We have an 8 Node 1.0.10 Cassandra cluster with Replication of 3, running on customer location, they all should be in the same DC, but we are NOT 100% sure. We are having problem with the our own Cassandra client, the log file of the client shows many socket timeout and socket closed errors,

Cassandra (2.0.4) pagination and total records?

2014-03-17 Thread Philip G
Is there a way to get total number of records when working with limit and internal pagination? Every example I found online was purely about using LIMIT and sort_col token(sort_col). Nothing about getting the total matching records. (PS: if there's a better group to ask CQL questions, please let

Re: Cassandra (2.0.4) pagination and total records?

2014-03-17 Thread Robert Coli
On Mon, Mar 17, 2014 at 4:27 PM, Philip G g...@gpcentre.net wrote: Is there a way to get total number of records when working with limit and internal pagination? Every example I found online was purely about using LIMIT and sort_col token(sort_col). Nothing about getting the total matching

Re: Cassandra (2.0.4) pagination and total records?

2014-03-17 Thread Philip G
On Mon, Mar 17, 2014 at 4:54 PM, Robert Coli rc...@eventbrite.com wrote: The form of your question suggests you are Doing It Wrong, FWIW. Okay, let me ask different question: how do you go about data browsing in a CQL3 table? Especially in situations were a single query could return a couple

Re: Cassandra (2.0.4) pagination and total records?

2014-03-17 Thread Iain Finlayson
Hi Philip, Read this blog post http://www.wentnet.com/blog/?p=24 It talks about COUNT but might give some answers to your first question. On Monday, March 17, 2014, Philip G g...@gpcentre.net wrote: On Mon, Mar 17, 2014 at 4:54 PM, Robert Coli

Re: Cassandra (2.0.4) pagination and total records?

2014-03-17 Thread Tupshin Harper
Read the automatic paging portion of this post : http://www.datastax.com/dev/blog/client-side-improvements-in-cassandra-2-0 On Mar 17, 2014 8:09 PM, Philip G g...@gpcentre.net wrote: On Mon, Mar 17, 2014 at 4:54 PM, Robert Coli rc...@eventbrite.com wrote: The form of your question suggests you

Re: Cassandra (2.0.4) pagination and total records?

2014-03-17 Thread Philip G
Thanks for the links. As I'm messing around with CQL, I'm realizing Cassandra isn't going to do what I need. Quite simply, here's a basic layout of my table: myTable ( visit_dt timestamp, cid ascii, company text, // ... other stuff primary key (visit_dt, cid) ); index on (company) My

Cassandra data migration from 1.9.8 to 2.0.2

2014-03-17 Thread Lakshmi Kanth
Hi I am trying to migrate data from a 3 node cluster to a new 5 node cluster. After completion of the migration I am seeing few additional records in new system. After analysis, I found that these records were already deleted in the source system just few days before the migration. It seems