Cassandra Python Driver - User Defined Functions

2017-08-30 Thread Earl Lapus
Hi, I'm learning to use the Python Driver API as documented here: https://datastax.github.io/python-driver/api/index.html The database that I am working on has a user define function, similar to what is described here: http://batey.info/cassandra-aggregates-min-max-avg-group.html Is there a way

Re: system_auth replication factor in Cassandra 2.1

2017-08-30 Thread Nate McCall
Regardless, if you are not modifying users frequently (with five you most likely are not), make sure turn the permission cache wyyy up. In 2.1 that is just: permissions_validity_in_ms (default is 2000 or 2 seconds). Feel free to set it to 1 day or some such. The corresponding async update

Re: Cassandra All host(s) tried for query failed (no host was tried)

2017-08-30 Thread Nate McCall
If these app instances sit idle for a while, they might just be timing out their sockets. You can tweak socket settings on the driver as described here: https://github.com/datastax/java-driver/tree/3.x/manual/socket_options Perhaps start with explicitly setting keepAlive to true as that may or

Re: Cassandra 3.7 repair error messages

2017-08-30 Thread Erick Ramirez
No, it isn't normal for sessions to fail and you will need to investigate. You need to review the logs on node .204 to determine why the session failed. For example, did it timeout because of a very large sstable? Or did the connection get truncated after a while? You will need to address the

Re: Cassandra snapshot restore with VNODES missing some data

2017-08-30 Thread Erick Ramirez
For your method to work, you have to restore like-for-like, i.e. you need to mirror the source nodes by using the exact same tokens in system.local. For example, if source node A has tokens 567, 678 and 789, then you need to setup the equivalent target node with exactly those tokens. Otherwise,

Re: system_auth replication factor in Cassandra 2.1

2017-08-30 Thread Erick Ramirez
It looks like nodes .113 and .116 have a problem. Repairing system_auth which only contains 5 users should not take that long. Run with just nodetool repair system_auth (without the -pr flag). But first investigate why those 2 nodes are slow to respond. Cheers! On Thu, Aug 31, 2017 at 3:00 AM,

Re: Cassandra All host(s) tried for query failed (no host was tried)

2017-08-30 Thread Erick Ramirez
No host was tried because nodes were unresponsive and the driver marked them as down. When too many nodes get marked as down, the driver eventually runs out of nodes so ends up in NoHostAvailableException. Nodes become unresponsive because they are overloaded. You either throttle back the app

Cassandra 3.7 repair error messages

2017-08-30 Thread Paul Pollack
Hi, I'm trying to run a repair on a node my Cassandra cluster, version 3.7, and was hoping someone may be able to shed light on an error message that keeps cropping up. I started the repair on a node after discovering that it somehow became partitioned from the rest of the cluster, e.g. nodetool

Re: Hints replay incompatible between 2.x and 3.x

2017-08-30 Thread Erick Ramirez
1TB of hints suggests you don't have enough capacity in your cluster. The only way around that is to add more nodes. On Thu, Aug 31, 2017 at 3:05 AM, Jason Brown wrote: > Hi Andrew, > > This question is best for the user@ list, included here. > > Thanks, > > -Jason > > On

Re: Invalid Gossip generation

2017-08-30 Thread Erick Ramirez
Unfortunately, the only available workaround is a rolling restart of the cluster until you get the fix in C* 2.1.13 (CASSANDRA-10969 ). On Thu, Aug 31, 2017 at 5:52 AM, Mark Furlong wrote: > I have a 2.1.12 cluster

Re: Cassandra snapshot restore with VNODES missing some data

2017-08-30 Thread Jai Bheemsen Rao Dhanwada
Also, When use the same DC and Rack, I am still getting the below error when I specify the 256 tokens from the source cluster and restart it. ERROR [main] 2017-08-30 17:17:20,878 CassandraDaemon.java:395 - Fatal configuration error org.apache.cassandra.exceptions.ConfigurationException: Cannot

Re: Cassandra snapshot restore with VNODES missing some data

2017-08-30 Thread Jai Bheemsen Rao Dhanwada
yes source use the vnodes. I am restoring to a different cluster in different datacenter, so the rack and dc changes. does that matter? On Wed, Aug 30, 2017 at 5:55 PM, kurt greaves wrote: > Does the source cluster also use vnodes? You will need to ensure you use > the

Re: Cassandra snapshot restore with VNODES missing some data

2017-08-30 Thread kurt greaves
Does the source cluster also use vnodes? You will need to ensure you use the same tokens for each node as the snapshots used in the source (and also ensure same tokens apply to same racks).

Re: system_auth replication factor in Cassandra 2.1

2017-08-30 Thread kurt greaves
For that many nodes mixed with vnodes you probably want a lower RF than N per datacenter. 5 or 7 would be reasonable. The only down side is that auth queries may take slightly longer as they will often have to go to other nodes to be resolved, but in practice this is likely not a big deal as the

Re: Unsuccessful back-up and restore with differing counts

2017-08-30 Thread Jai Bheemsen Rao Dhanwada
This is link gives me 404, can you please give me the correct link? On Sat, May 13, 2017 at 10:51 AM, Surbhi Gupta wrote: > Below link has the method u r looking for > http://datascale.io/cloning-cassandra-clusters-fast-way/ > > On Sat, May 13, 2017 at 9:49 AM

Cassandra snapshot restore with VNODES missing some data

2017-08-30 Thread Jai Bheemsen Rao Dhanwada
Hello All, I am trying to restore a cluster with VNODE(s) to a new cluster using the snapshot. After the restore when I query data from cql I see some random data is missing. I used the below steps to restore 1. Snapshot on the source cluster 2. Setup new cluster(VNODEs) with the same schema as

Invalid Gossip generation

2017-08-30 Thread Mark Furlong
I have a 2.1.12 cluster and have experienced an invalid gossip generation error on one of the nodes. We have tried altering the local generation value without achieving the desired result. A rolling restart of this production cluster of 136 nodes is a last chance option. The next step we know

Re: Hints replay incompatible between 2.x and 3.x

2017-08-30 Thread Jason Brown
Hi Andrew, This question is best for the user@ list, included here. Thanks, -Jason On Wed, Aug 30, 2017 at 10:00 AM, Andrew Whang wrote: > In evaluating 3.x, we found that hints are unable to be replayed between > 2.x and 3.x nodes. This introduces a risk during the

Re: system_auth replication factor in Cassandra 2.1

2017-08-30 Thread Chuck Reynolds
select * from users; OK here’s the trace. The times are super long. name | super ---+--- user1 | False user2 | True user3 | True user4 | False user5 | True (5 rows) Tracing session: 55a4aa50-8da3-11e7-adbb-e7bbc3a8a72e activity

Re: system_auth replication factor in Cassandra 2.1

2017-08-30 Thread Oleksandr Shulgin
On Wed, Aug 30, 2017 at 6:40 PM, Chuck Reynolds wrote: > How many users do you have (or expect to be found in system_auth.users)? > > 5 users. > > What are the current RF for system_auth and consistency level you are > using in cqlsh? > > 135 in one DC and 227 in the

Re: system_auth replication factor in Cassandra 2.1

2017-08-30 Thread Chuck Reynolds
How many users do you have (or expect to be found in system_auth.users)? 5 users. What are the current RF for system_auth and consistency level you are using in cqlsh? 135 in one DC and 227 in the other DC. Consistency level one Did you try to obtain a trace of a timing-out query (with

Re: system_auth replication factor in Cassandra 2.1

2017-08-30 Thread Oleksandr Shulgin
On Wed, Aug 30, 2017 at 6:20 PM, Chuck Reynolds wrote: > So I tried to run a repair with the following on one of the server. > > nodetool repair system_auth -pr –local > > > > After two hours it hadn’t finished. I had to kill the repair because of > another issue and

Re: system_auth replication factor in Cassandra 2.1

2017-08-30 Thread Chuck Reynolds
So I tried to run a repair with the following on one of the server. nodetool repair system_auth -pr –local After two hours it hadn’t finished. I had to kill the repair because of another issue and haven’t tried again. Why would such a small table take so long to repair? Also what would happen

Re: system_auth replication factor in Cassandra 2.1

2017-08-30 Thread Oleksandr Shulgin
On Wed, Aug 30, 2017 at 5:50 PM, Chuck Reynolds wrote: > So I’ve read that if your using authentication in Cassandra 2.1 that your > replication factor should match the number of nodes in your datacenter. > > > > *Is that true?* > > > > I have two datacenter cluster, 135

Re: system_auth replication factor in Cassandra 2.1

2017-08-30 Thread Sam Tunnicliffe
It's a better rule of thumb to use an RF of 3 to 5 per DC and this is what the docs now suggest: http://cassandra.apache.org/doc/latest/operating/security.html#authentication Out of the box, the system_auth keyspace is setup with SimpleStrategy and RF=1 so that it works on any new system

RE: system_auth replication factor in Cassandra 2.1

2017-08-30 Thread Jonathan Baynes
I recently came across an issue where by my user Keyspace was replicated by 3 (I have 3 nodes) but my system_auth was default to 1, we also use authentication, I then lost 2 of my nodes and because authentication wasn’t replicated I couldn’t log in. Once I resolved the issue, and got the

Re: Cassandra All host(s) tried for query failed (no host was tried)

2017-08-30 Thread Oleksandr Shulgin
On Wed, Aug 30, 2017 at 5:10 PM, Ivan Iliev wrote: > Hello everyone, > > We are using Cassandra 3.9 for storing quite a lot of data produced from > our tester machines. > > Occasionally, we are seeing issues with apps not being able to communicate > with Cassandra

system_auth replication factor in Cassandra 2.1

2017-08-30 Thread Chuck Reynolds
So I’ve read that if your using authentication in Cassandra 2.1 that your replication factor should match the number of nodes in your datacenter. Is that true? I have two datacenter cluster, 135 nodes in datacenter 1 & 227 nodes in an AWS datacenter. Why do I want to replicate the system_auth

Cassandra All host(s) tried for query failed (no host was tried)

2017-08-30 Thread Ivan Iliev
Hello everyone, We are using Cassandra 3.9 for storing quite a lot of data produced from our tester machines. Occasionally, we are seeing issues with apps not being able to communicate with Cassandra nodes, returning the following errors (captured in servicemix logs): > by:

[ANNOUNCE] Gocqlx - Go productivity toolkit

2017-08-30 Thread Michał Matczuk
At Scylla we are open sourcing a library we use on top of the Go driver (gocql) to communicate with ScyllaDB and Apache Cassandra. Gocqlx provides: * Builders for SELECT, INSERT, UPDATE DELETE and BATCH * Queries with named parameters (:identifier) support * Binding parameters form struct or map

Re: Working With Prepared Statements

2017-08-30 Thread Shalom Sagges
Thanks guys for all the info! Shalom Sagges DBA T: +972-74-700-4035 We Create Meaningful Connections On Wed, Aug 30, 2017 at 10:54

Re: Cassandra and OpenJDK

2017-08-30 Thread Myrle Krantz
Thank you Kurt and Eric. Myrle On Mon, Aug 28, 2017 at 11:53 PM, kurt greaves wrote: > OpenJDK is fine. - To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org For additional commands, e-mail:

Re: Working With Prepared Statements

2017-08-30 Thread Oleksandr Shulgin
On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges wrote: > Insights, anyone? > There were reports of Cassandra failing to start due to trying to load the prepared statements from a cached table. This can only affect you if you have a lot (tens of thousands, IIRC) of

Re: why the cluster does not work well after addding two new nodes

2017-08-30 Thread 赵豫峰
Hi, Nandan, thanks for your replay. 1) Yes the config is wrong. My doubt is why I can get the result when one node is alive, but can't when two or three nodes are alive; 2) I guess your mean the auto_bootstrap configure parameter? It is not set in cassandra.yaml; 3) Dose it must to