Re: Running Cassandra in Integration Tests

2016-10-06 Thread Edward Capriolo
Checkout https://github.com/edwardcapriolo/farsandra. It falls under the realm of almost 100% pure java (besides the fact it uses some shell to launch Cassandra). On Thu, Oct 6, 2016 at 7:08 PM, Ali Akhtar wrote: > Is it possible to create an isolated cassandra instance

Fwd: Counter global logical clock

2016-10-06 Thread Varun Barala
Hi all Users, Recently I was restoring some sstables by changing their timestamp. But in case of counter It's different there are few things I'd like to ask:- * What is the maximum value of global logical clock? *Long.MAX_VALUE* ? ** what will happen If updates hit this MAX_VALUE value ?* I

Re: Running Cassandra in Integration Tests

2016-10-06 Thread Jonathan Haddad
3.9 falls under the Tick Tock release cycle, which is almost completely untested in production by experienced operators. In the cases where it has been tested, there have been numerous bugs found which I (and I think most people on this list) consider to be show stoppers. Additionally, the Tick

Re: Running Cassandra in Integration Tests

2016-10-06 Thread Peddi, Praveen
Our application takes care of creating keyspace and tables as necessary. Our tests didn't need to worry about that. On Oct 6, 2016, at 9:22 PM, Ali Akhtar > wrote: Oh, and how do you generate your tables / keyspaces for the tests (if you do)?

Re: Running Cassandra in Integration Tests

2016-10-06 Thread Peddi, Praveen
Akthar, We use 2.2.4. I am not sure if cassandra.config can take a classpath. Feel free to try. It was easy enough to copy the resource to temp file location for us. Praveen On Oct 6, 2016, at 9:21 PM, Ali Akhtar > wrote: Peddi, Thanks, does

Re: Running Cassandra in Integration Tests

2016-10-06 Thread Ali Akhtar
Oh, and how do you generate your tables / keyspaces for the tests (if you do)? On Fri, Oct 7, 2016 at 6:21 AM, Ali Akhtar wrote: > Peddi, > > Thanks, does this start @ localhost, default port? And, mind sharing which > version of cassandra you use this with? will this work

Re: Running Cassandra in Integration Tests

2016-10-06 Thread Ali Akhtar
Peddi, Thanks, does this start @ localhost, default port? And, mind sharing which version of cassandra you use this with? will this work on 3.9, or on 3.7? Also, why is the config in a temp location - wouldn't it be better to put it in src/test/resources and try to specify that? Thanks. On

Re: Running Cassandra in Integration Tests

2016-10-06 Thread Peddi, Praveen
Honestly there isn't much code to share. Here is the code (excluded exception handling). For yaml location, we have the classpathpath and write to temp location everytime. System.setProperty("cassandra.config", "file://" + YAML_LOCATION); cassandraDaemon = new CassandraDaemon();

Re: Running Cassandra in Integration Tests

2016-10-06 Thread Ali Akhtar
Peddi @ Amazon, would you be able to share your code such as in a gist, if possible, please? Also, which version of cassandra are you doing that with? On Fri, Oct 7, 2016 at 5:41 AM, Peddi, Praveen wrote: > We could not use cassandra unit for licensing reasons so we ended

Re: Running Cassandra in Integration Tests

2016-10-06 Thread Kant Kodali
embedded cassandra instance? you mean dont persist any data to disk? If so I dont see that being possible at this time. prior to running your test code you just run shell script and after test truncate everything and bring down the instance. one way or other this needs to happen underneath so I

Re: Running Cassandra in Integration Tests

2016-10-06 Thread Peddi, Praveen
We could not use cassandra unit for licensing reasons so we ended up instantiate CassandraDeamon after setting system property of cassandra.config={yaml location}. It works fine for our needs. Praveen From: Ali Akhtar > Reply-To:

Re: Running Cassandra in Integration Tests

2016-10-06 Thread Ali Akhtar
That looks great Andrew, but it doesn't seem to have been committed to for 5 months. Is anyone still using cassandra-unit , does it work with latest cassandra versions (e.g 3.9)? On Fri, Oct 7, 2016 at 5:33 AM, Andrew Tolbert wrote: > Hi Ali, > > cassandra-unit

Re: Running Cassandra in Integration Tests

2016-10-06 Thread Andrew Tolbert
Hi Ali, cassandra-unit might be what you are looking for. It allows you to run an embedded cassandra instance along side your tests and has some nice integration with JUnit. Thanks, Andy On Thu, Oct 6, 2016 at 7:13 PM Ali Akhtar

Re: Running Cassandra in Integration Tests

2016-10-06 Thread Ali Akhtar
Ok, but that's not what this question is about. I'm looking for a way to run an embedded cassandra instance which is created & destroyed during tests and which doesn't persist any state outside the tests. On Fri, Oct 7, 2016 at 5:10 AM, Kant Kodali wrote: > you dont need to

Re: Running Cassandra in Integration Tests

2016-10-06 Thread Ali Akhtar
Okay.. but how would I start this instance? Is there a java api to programmatically start / destroy an instance during tests? On Fri, Oct 7, 2016 at 4:56 AM, Kant Kodali wrote: > sure as long as that isolated instance is treated as separate cluster you > shouldn't run into

Re: Running Cassandra in Integration Tests

2016-10-06 Thread Kant Kodali
sure as long as that isolated instance is treated as separate cluster you shouldn't run into any problems. On Thu, Oct 6, 2016 4:08 PM, Ali Akhtar ali.rac...@gmail.com wrote: Is it possible to create an isolated cassandra instance which is run during integration tests and it disappears

Running Cassandra in Integration Tests

2016-10-06 Thread Ali Akhtar
Is it possible to create an isolated cassandra instance which is run during integration tests and it disappears after tests have finished running? Then its recreated the next time tests run (perhaps being populated with test data). I'm using Java.

RE: Rationale for using Hazelcast in front of Cassandra?

2016-10-06 Thread KARR, DAVID
Clearly, with “traditional” RDBMSs, you tend to put a cache “close to” the client. However, I was under the impression that Cassandra nodes could be positioned “close to” their clients, and Cassandra has its own cache (I believe), so how effective would it be to put a cache in front of a

Re: Rationale for using Hazelcast in front of Cassandra?

2016-10-06 Thread Dorian Hoxha
Maybe when you can have very hot keys that can give trouble to your 3(replication) cassandra nodes ? Example: why does facebook use memcache ? They certainly have things distributed on thousands of servers. On Thu, Oct 6, 2016 at 11:40 PM, KARR, DAVID wrote: > I've seen use

Rationale for using Hazelcast in front of Cassandra?

2016-10-06 Thread KARR, DAVID
I've seen use cases that briefly describe using Hazelcast as a "front-end" for Cassandra, perhaps as a cache. This seems counterintuitive to me. Can someone describe to me when this kind of architecture might make sense?

Re: Tombstoned error and then OOM

2016-10-06 Thread kurt Greaves
you'll still need to query all the data even if it's secondary indexed. On 4 October 2016 at 17:13, INDRANIL BASU wrote: > The query has a where clause on a column which is a secondary index in the > column family. > E.g > select * from test_schema.test_cf where status =

Re: Nodetool rebuild question

2016-10-06 Thread Jeff Jirsa
Read repairs (both foreground/blocking due to consistency level requirements and background/nonblocking due to table option/probability) will go memTable -> flush -> sstable. From: Anubhav Kale Reply-To: "user@cassandra.apache.org"

RE: Nodetool rebuild question

2016-10-06 Thread Anubhav Kale
Sure. When a read repair happens, does it go via the memtable -> SS Table route OR does the source node send SS Table tmp files directly to inconsistent replica ? From: Jeff Jirsa [mailto:jeff.ji...@crowdstrike.com] Sent: Wednesday, October 5, 2016 2:20 PM To: user@cassandra.apache.org Subject:

Re: Partition Key - Wide rows?

2016-10-06 Thread Saladi Naidu
It depends on Partition/Primary key design. In order to execute all 3 queries, Partition Key is Org id and others are Clustering keys. if there are many org's it will be ok, but if it is one org then a single partition  will hold all the data and its not good Naidu Saladi On Thursday,

Re: Partition Key - Wide rows?

2016-10-06 Thread Jonathan Haddad
> In my use-case, its probably okay to partition all the org data together. Maybe, maybe not. Cassandra doesn't handle really big partitions very well right now. If you've got more than 100MB of data per org, you're better off breaking it up (by project or team) and doing multiple queries to

Re: Partition Key - Wide rows?

2016-10-06 Thread Ali Akhtar
Thanks, Phil. 1- In my use-case, its probably okay to partition all the org data together. This is for a b2b enterprise SaaS application, the customers will be organizations. So it is probably okay to store each org's data next to each other, right? 2- I'm thinking of having the primary key be:

Partition Key - Wide rows?

2016-10-06 Thread Ali Akhtar
Heya, I'm designing some tables, where data needs to be stored in the following hierarchy: Organization -> Team -> Project -> Issues I need to be able to retrieve issues: - For the whole org - using org id - For a team (org id + team id) - For a project (org id + team id + project id) - If

Re: dtests jolokia fails to attach

2016-10-06 Thread Benjamin Roth
That did the trick! Thanks. I also recognized that one down in the contribution.md I guess it would be also a good idea to show this notice if jolokia fails to attach. Thanks guys! 2016-10-06 14:12 GMT+02:00 Marcus Eriksson : > It is this: "-XX:+PerfDisableSharedMem" - in

Re: system_distributed.repair_history table

2016-10-06 Thread Chris Lohfink
small reminder that unless you have autosnapshot to false in cassandra.yaml, you will need to clear snapshot (nodetool clearsnapshot system_distributed) to actually delete the sstables On Thu, Oct 6, 2016 at 9:25 AM, Saladi Naidu wrote: > Thanks for the response. It makes

Re: system_distributed.repair_history table

2016-10-06 Thread Saladi Naidu
Thanks for the response. It makes sense to periodically truncate as it is only for debugging purposes Naidu Saladi On Wednesday, October 5, 2016 8:03 PM, Chris Lohfink wrote: The only current solution is to truncate it periodically. I opened 

Re: Little question

2016-10-06 Thread Alain RODRIGUEZ
Hi Rubén, Good luck with your adoptive Cassandra cluster :-). Some thoughts: You are struggling with balancing your cluster, there is a lot of documentation about how the Cassandra Architecture work. Some insight to help you understand what your setup is while reading. - You are *not* using

Re: dtests jolokia fails to attach

2016-10-06 Thread Marcus Eriksson
It is this: "-XX:+PerfDisableSharedMem" - in your dtest you need to do "remove_perf_disable_shared_mem(node1)" before starting the node /Marcus On Thu, Oct 6, 2016 at 8:30 AM, Benjamin Roth wrote: > Maybe additional information, this is the CS command line for ccm

Re: dtests jolokia fails to attach

2016-10-06 Thread Paulo Motta
I had this problem before but can't remember the root cause, but I think it was related to conflicting JVMs on the same machine. Can you check if you have more than one JVM installed and try to define JAVA_HOME if it's not defined? Maybe this is related:

Re: dtests jolokia fails to attach

2016-10-06 Thread Benjamin Roth
Maybe additional information, this is the CS command line for ccm node1: br 20376 3.2 8.6 2331136 708308 pts/5 Sl 06:10 0:30 java -Xloggc:/home/br/.ccm/test/node1/logs/gc.log -ea -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -XX:+HeapDumpOnOutOfMemoryError -Xss256k

dtests jolokia fails to attach

2016-10-06 Thread Benjamin Roth
Since some days I have the problem that I cannot run a dtest as jolokia fails to attach to the process. It worked some days ago. I tried both on MacOS + Linux with dtest master and pip'ed requirements. dtest output is: Failed to start jolokia agent (command was: