Token function in CQL for composite partition key

2015-01-07 Thread Ajay
Hi, I have a column family as below: (Wide row design) CREATE TABLE clicks (hour text,adId int,itemId int,time timeuuid,PRIMARY KEY((adId, hour), time, itemId)) WITH CLUSTERING ORDER BY (time DESC); Now to query for a given Ad Id and specific 3 hours say 2015-01-07 11 to 2015-01-07 14, how do I

Re: deletedAt and localDeletion

2015-01-07 Thread Kais Ahmed
Thanks Ryan 2015-01-06 20:21 GMT+01:00 Ryan Svihla r...@foundev.pro: If you look at the source there are some useful comments regarding those specifics https://github.com/apache/cassandra/blob/8d8fed52242c34b477d0384ba1d1ce3978efbbe8/src/java/org/apache/cassandra/db/DeletionTime.java /** *

Re: Token function in CQL for composite partition key

2015-01-07 Thread Ajay
Thanks. Basically there are two access patterns: 1) For last 1 hour (or more if last batch failed for some reason), get the clicks data for all Ads. But it seems not possible as Ad Id is part of Partition key. 2) For last 1 hour (or more if last batch failed for some reason), get the clicks data

Are Triggers in Cassandra 2.1.2 performace Hog??

2015-01-07 Thread Asit KAUSHIK
HI All, We are trying to integrate elasticsearch with Cassandra and as the river plugin uses select * from any table it seems to be bad performance choice. So i was thinking of inserting into elasticsearch using Cassandra trigger. So i wanted your view does a Cassandra Trigger impacts the

Re: Re: Is it possible to implement a interface to replace a row in cassandra using cassandra.thrift?

2015-01-07 Thread Ryan Svihla
really depends on your code for error handling, and since you're using thrift it really depends on the client, if you're doing client side timestamps then it's not related to time issues. On Tue, Jan 6, 2015 at 8:19 PM, yhq...@sina.com wrote: Hi, I found that in my function, both delete and

Re: Are Triggers in Cassandra 2.1.2 performace Hog??

2015-01-07 Thread Ken Hancock
When last I looked at Datastax Enterprise (DSE 3.0ish), it exhibits the same problem that you highlight, no different than your good idea of asynchronously pushing to ES. Each Cassandra write was indexed independently by each server in the replication group. If a node timed out or a mutation was

Re: Are Triggers in Cassandra 2.1.2 performace Hog??

2015-01-07 Thread DuyHai Doan
Be very very careful not to perform blocking calls to ElasticSearch in your trigger otherwise you will kill C* performance. The biggest danger of the triggers in their current state is that they are on the write path. In your trigger, you can try to push the mutation asynchronously to ES but in

TombstoneOverwhelmingException for few tombstones

2015-01-07 Thread Jens Rantil
Hi, I have a single partition key that been nagging me because I am receiving org.apache.cassandra.db.filter.TombstoneOverwhelmingException. After filing https://issues.apache.org/jira/browse/CASSANDRA-8561 I managed to find the partition key in question and which machine it was located on

Re: Token function in CQL for composite partition key

2015-01-07 Thread Sylvain Lebresne
On Wed, Jan 7, 2015 at 10:18 AM, Ajay ajay.ga...@gmail.com wrote: Hi, I have a column family as below: (Wide row design) CREATE TABLE clicks (hour text,adId int,itemId int,time timeuuid,PRIMARY KEY((adId, hour), time, itemId)) WITH CLUSTERING ORDER BY (time DESC); Now to query for a

Re: Rebooted cassandra node timing out all requests but recovers after a while

2015-01-07 Thread Duncan Sands
Hi Anand, On 08/01/15 02:02, Anand Somani wrote: Hi, We have a 3 node cluster (on VM). Eg. host1, host2, host3. One of the VM rebooted (host1) and when host1 came up it would see the others as down and the others (host2 and host3) see it as down. So we restarted host2 and now the ring seems

Re: Keyspace uppercase name issues

2015-01-07 Thread Harel Gliksman
Thanks Ajay for your reply, My problem is not with the cqlsh interface, but with the java Datastax driver. It seems that for cqlsh, one needs to simply quote names that contain upper cases. With the driver, I experience inconsistent handling of upper case. Either I am doing something wrong, or

How to bulkload into a specific data center?

2015-01-07 Thread Benyi Wang
I set up two virtual data centers, one for analytics and one for REST service. The analytics data center sits top on Hadoop cluster. I want to bulk load my ETL results into the analytics data center so that the REST service won't have the heavy load. I'm using CQLTableInputFormat in my Spark

Rebooted cassandra node timing out all requests but recovers after a while

2015-01-07 Thread Anand Somani
Hi, We have a 3 node cluster (on VM). Eg. host1, host2, host3. One of the VM rebooted (host1) and when host1 came up it would see the others as down and the others (host2 and host3) see it as down. So we restarted host2 and now the ring seems fine(everybody sees everybody as up). But now the

Re: Are Triggers in Cassandra 2.1.2 performace Hog??

2015-01-07 Thread Jack Krupansky
DSE does now have a queue to decouple Cassandra insert and Solr indexing. It will block only when/if the queue is filled - you can configure the size of the queue. So, to be clear, DSE no longer has the highlighted problem mentioned for ES. -- Jack Krupansky On Wed, Jan 7, 2015 at 9:46 AM, Ken

Re:

2015-01-07 Thread Ryan Svihla
Something to start considering is the partition key (first part of your primary key) drives your model more than anything. So if you're querying for all of X your partition key should probably be X, but there are some constraints to be mindful of. The rest of replies inline On Wed, Jan 7, 2015

Re: Are Triggers in Cassandra 2.1.2 performace Hog??

2015-01-07 Thread Ryan Svihla
@Ken So I actually support a lot of the DSE Search users and teach classes on it, so as long as you're not dropping mutations you're in sync, and if you're dropping mutations you're probably sized way too small anyway, and once you run repair (which you should be doing anyway when dropping

Is it possible to delete columns or row using CQLSSTableWriter?

2015-01-07 Thread Benyi Wang
CQLSSTableWriter only accepts an INSERT or UPDATE statement. I'm wondering whether make it accept DELETE statement. I need to update my cassandra table with a lot of data everyday. * I may need to delete a row (given the partition key) * I may need to delete some columns. For example, there are

Re: Are Triggers in Cassandra 2.1.2 performace Hog??

2015-01-07 Thread Asit KAUSHIK
HI All, What i intend to do is on every write i would push the code to elasticsearch using the Trigger. I know it would impact the Cassandra write but given that the WRITE is pretty performant on Cassandra would that lag be a big one. Also as per my information SOLR has limitation of using

Keyspace uppercase name issues

2015-01-07 Thread Harel Gliksman
Hi, We have a Cassandra cluster with Keyspaces that were created using the thrift api and thei names contain upper case letters. We are trying to use the new Datastax driver (version 2.1.4, maven's latest ) but encountering some problems due to upper case handling. Datastax provide this guidance

Re: Keyspace uppercase name issues

2015-01-07 Thread Ajay
We noticed the same issue. From the cassandra-cli, it allows to use upper case or mixed case Keyspace name but from cqlsh it auto converts to lower case. Thanks Ajay On Wed, Jan 7, 2015 at 9:44 PM, Harel Gliksman harelg...@gmail.com wrote: Hi, We have a Cassandra cluster with Keyspaces that

Re: Are Triggers in Cassandra 2.1.2 performace Hog??

2015-01-07 Thread Robert Coli
On Wed, Jan 7, 2015 at 5:40 AM, Asit KAUSHIK asitkaushikno...@gmail.com wrote: We are trying to integrate elasticsearch with Cassandra and as the river plugin uses select * from any table it seems to be bad performance choice. So i was thinking of inserting into elasticsearch using Cassandra

Re: Are Triggers in Cassandra 2.1.2 performace Hog??

2015-01-07 Thread Jonathan Haddad
+1. Don't use triggers. On Wed, Jan 7, 2015 at 10:49 AM, Robert Coli rc...@eventbrite.com wrote: On Wed, Jan 7, 2015 at 5:40 AM, Asit KAUSHIK asitkaushikno...@gmail.com wrote: We are trying to integrate elasticsearch with Cassandra and as the river plugin uses select * from any table it