cassandra-2.0

Cassandra java driver protocol version and connection limits don't match

假如想象 提交于 2020-06-12 18:55:01
问题 I am using java driver version: 2.1.4 Cassandra version: dsc-cassandra-2.1.10 Output from cql gives the following cqlsh 5.0.1 | Cassandra 2.1.10 | CQL spec 3.2.1 | Native protocol v3 I am protocol V3. But it throws an exception when I try to set it to more than 128 requests per connection. This seems to be a restriction in V2. Explained below: The following code block: PoolingOptions poolingOptions = new PoolingOptions(); poolingOptions.setCoreConnectionsPerHost(HostDistance.LOCAL, 8);

Cassandra java driver protocol version and connection limits don't match

久未见 提交于 2020-06-12 18:52:51
问题 I am using java driver version: 2.1.4 Cassandra version: dsc-cassandra-2.1.10 Output from cql gives the following cqlsh 5.0.1 | Cassandra 2.1.10 | CQL spec 3.2.1 | Native protocol v3 I am protocol V3. But it throws an exception when I try to set it to more than 128 requests per connection. This seems to be a restriction in V2. Explained below: The following code block: PoolingOptions poolingOptions = new PoolingOptions(); poolingOptions.setCoreConnectionsPerHost(HostDistance.LOCAL, 8);

Cannot connect to Cassandra from Spark (Contact points contain multiple data centers)

≡放荡痞女 提交于 2020-06-12 07:32:37
问题 I am trying to run my first spark job (a Scala job that accesses Cassandra) which is failing and showing the following error : java.io.IOException: Failed to open native connection to Cassandra at {<ip>}:9042 at com.datastax.spark.connector.cql.CassandraConnector$.com$datastax$spark$connector$cql$CassandraConnector$$createSession(CassandraConnector.scala:164) at com.datastax.spark.connector.cql.CassandraConnector$$anonfun$2.apply(CassandraConnector.scala:150) at com.datastax.spark.connector

Cannot connect to Cassandra from Spark (Contact points contain multiple data centers)

允我心安 提交于 2020-06-12 07:32:12
问题 I am trying to run my first spark job (a Scala job that accesses Cassandra) which is failing and showing the following error : java.io.IOException: Failed to open native connection to Cassandra at {<ip>}:9042 at com.datastax.spark.connector.cql.CassandraConnector$.com$datastax$spark$connector$cql$CassandraConnector$$createSession(CassandraConnector.scala:164) at com.datastax.spark.connector.cql.CassandraConnector$$anonfun$2.apply(CassandraConnector.scala:150) at com.datastax.spark.connector

Cassandra tombstones count multiple queries vs single query

て烟熏妆下的殇ゞ 提交于 2020-01-23 13:18:07
问题 I've a cassandra table definition as following CREATE TABLE mytable ( colA text, colB text, timeCol timestamp, colC text, PRIMARY KEY ((colA, colB, timeCol), colC) ) WITH.... I want to know if number of tombstones would vary between following types of queries: 1. delete from mytable where colA = '...' AND colB = '...' and timeCol = 111 Above query affect multiple records, (multiple values of colC) 2. delete from mytable where colA = '...' AND colB = '...' and timeCol = 111 AND colC = '...'

Check current TTL on collection columns in Cassandra

青春壹個敷衍的年華 提交于 2020-01-17 08:47:09
问题 Lets assume I have a Column Family with following schema: CREATE TABLE users ( user_id timeuuid, name varchar, last_name varchar, children list, phone_numbers map, PRIMARY KEY(user_id) ); Then I insert a row into this CF with "USING TTL 60000". When I want to verify if any of these columns still has TTL set I get error: "Cannot use selection function ttl on collections". My question is: how to get TTL on elements of a column that is defined as collection ? Cheers! 回答1: I reproduced your

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

纵饮孤独 提交于 2020-01-15 09:13:47
问题 We recently (this week) upgraded our java driver from 2.0.4 to 2.1.4 (we are running Cassandra version 2.0.12). We were using 2.0.4 for a long time (more than an year) in production and did not have this issue. But, after upgrading we starting seeing intermittent NoHostAvailableExceptions (that fail all the requests on client side): Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (no host was tried) at com.datastax.driver.core

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

时间秒杀一切 提交于 2020-01-15 09:13:09
问题 We recently (this week) upgraded our java driver from 2.0.4 to 2.1.4 (we are running Cassandra version 2.0.12). We were using 2.0.4 for a long time (more than an year) in production and did not have this issue. But, after upgrading we starting seeing intermittent NoHostAvailableExceptions (that fail all the requests on client side): Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (no host was tried) at com.datastax.driver.core

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

给你一囗甜甜゛ 提交于 2020-01-15 09:13:06
问题 We recently (this week) upgraded our java driver from 2.0.4 to 2.1.4 (we are running Cassandra version 2.0.12). We were using 2.0.4 for a long time (more than an year) in production and did not have this issue. But, after upgrading we starting seeing intermittent NoHostAvailableExceptions (that fail all the requests on client side): Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (no host was tried) at com.datastax.driver.core

How to set Cassandra (>2.0) JVM heap size of 8GB?

 ̄綄美尐妖づ 提交于 2020-01-14 10:46:34
问题 How to set Cassandra (>2.0) JVM heap size of 8GB? When I type in free -m it gives me the following. How can I set the Cassandra JVM heap size to 8GB? total used free shared buffers cached Mem: 16047 11336 4711 0 81 5814 -/+ buffers/cache: 5441 10606 Swap: 0 0 0 回答1: As stated in the Tuning Java resources section of the documentation: If you decide to change the Java heap sizing, both MAX_HEAP_SIZE and HEAP_NEWSIZE should should be set together in conf/cassandra-env.sh. Inside cassandra-env.sh