Re: Restoring keyspace using snapshots

2014-01-30 Thread John Anderstedt
In this case I would go on with the nodetool refresh, simply because you use the machines in a more effective way.(copy data from one node to another, each node cleans/refresh the data itself) if the clustersetup is the same with nodes/tokens there’s no need to copy all the data to one point

Re: Question about local reads with multiple data centers

2014-01-30 Thread Duncan Sands
Hi Donald, which driver are you using? With the datastax python driver you need to use the DCAwareRoundRobinPolicy for the load balancing policy if you want the driver to distinguish between your data centres, otherwise by default it round robins robins requests amongst all nodes regardless of

Re: Intermittent long application pauses on nodes

2014-01-30 Thread Sylvain Lebresne
I never figured out what kills stdout for C*. It's a library we depend on, didn't try too hard to figure out which one. Nah, it's Cassandra itself (in org.apache.cassandra.service.CassandraDaemon.activate()), but you can pass -f (for 'foreground') to not do it. On 29 January 2014 21:07,

Re: Nodetool cleanup on vnode cluster removes more data then wanted

2014-01-30 Thread Sylvain Lebresne
On Thu, Jan 30, 2014 at 3:23 AM, Edward Capriolo edlinuxg...@gmail.comwrote: Is this only a ByteOrderPartitioner problem? No, see the comments on https://issues.apache.org/jira/browse/CASSANDRA-6638for more details. -- Sylvain On Wed, Jan 29, 2014 at 7:34 PM, Tyler Hobbs

Re: question about secondary index or not

2014-01-30 Thread Edward Capriolo
There is a aubtle difference between work well amd efficient design. Say you add this index, that is a huge cost on disk just because cql may not allow the where clause you want. Shameless plug but this is why i worked on intravert...server side paging may be the right answer here. I plan on

Re: Possibly losing data with corrupted SSTables

2014-01-30 Thread Rahul Menon
Looks like the sstables are corrupt. I dont believe there is a method to recover those sstables. I would delete them and run a repair to ensure data consistency. Rahul On Wed, Jan 29, 2014 at 11:29 PM, Francisco Nogueira Calmon Sobral fsob...@igcorp.com.br wrote: Hi, Rahul. I've run

Re: Possibly losing data with corrupted SSTables

2014-01-30 Thread Francisco Nogueira Calmon Sobral
Ok. I'll try this idea with one sstable. But, should I delete all the files associated with it? I mean, there is a difference in the number of files between the BAD sstable and a GOOD one, as I've already shown: BAD -- -rw-r--r-- 8 cassandra cassandra 991M Nov 8 15:11

Re: Possibly losing data with corrupted SSTables

2014-01-30 Thread Rahul Menon
Yes should delete all files related to cfname-ib-num-extension.db Run a repair after deletion On Thu, Jan 30, 2014 at 10:17 PM, Francisco Nogueira Calmon Sobral fsob...@igcorp.com.br wrote: Ok. I'll try this idea with one sstable. But, should I delete all the files associated with it? I

RE: Question about local reads with multiple data centers

2014-01-30 Thread Donald Smith
I found the answer. By default, the Datastax driver for Cassandra uses the RoundRobinPolicy for deciding which Cassandra node a client read or write request should be routed to. But that policy is independent of data center. Per the documentation

How to find last inserted value using CQL3

2014-01-30 Thread Rahul Gupta
I am trying to find last value inserted in a Cassandra1.2 table using CQL3 but can't find a solution. There is WRITETIME(col name) but that gives me time when that column was written. CREATE TABLE dev.eventTable ( eventName text, eventTime timestamp, rawEvent text, PRIMARY KEY

Re: How to find last inserted value using CQL3

2014-01-30 Thread DuyHai Doan
Hello Rahul 1) If your query pattern is to always request the last events, change your clustering order to DESC: WITH CLUSTERING ORDER BY (*eventTime* DESC); 2) To get the last or N last events, use the LIMIT clause of CQL3: select* ... *ORDER BY* eventTime* DESC LIMIT 1; 3) I believe the

Re: Restoring keyspace using snapshots

2014-01-30 Thread Robert Coli
On Wed, Jan 29, 2014 at 9:45 PM, Senthil, Athinanthny X. -ND athinanthny.x.senthil@disney.com wrote: Plan to backup and restore keyspace from PROD to PRE-PROD cluster which has same number of nodes. Keyspace will have few hundred millions of rows. We need to do this every other week.

Re: question about secondary index or not

2014-01-30 Thread Narendra Sharma
I am sure there will be other attributes associated with employee. Reading and throwing away records on the client is not good. Better maintain another column family that holds reference to only male employees. This will make your pagination logic simple on the client side without wasting