Questions tagged [datastax-java-driver]

A Java client driver for Apache Cassandra. This driver works exclusively with the Cassandra Query Language version 3 (CQL3) and Cassandra's binary protocol.

The DataStax Java driver for Apache Cassandra is the de-facto standard for connecting to a Cassandra cluster from a Java application. Can be used to connect to:

  • Apache Cassandra
  • DataStax Enterprise (DSE)
  • DataStax Astra DB

Support and documentation: https://docs.datastax.com/en/developer/java-driver/latest/

997 questions
0
votes
1 answer

Migration of Cassandra client Hector to java driver - replacement for ConnectionListener

Currently we are migrating Cassandra client from Hector to Java driver but unable to find replacement for ConnectionListener as this is used to avoid repeated client requests to the same DC which is already down for some reason. Code : …
0
votes
1 answer

Cassandra retrieving data through a thread pool

I am relatively new to Cassandra, I am trying to retrieve data using prepared statement executed via an Executor Pool. Looks like the data I am receiving is not consistent. I have this user_connections table, where user_id is the row key,…
0
votes
1 answer

After using cassandra 3.4 node in not reachable

I have installed cassandra 3.4on machine192.168.1.3` and trying to acces from othet machine i am getting com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /192.168.1.3:9042…
Manish Kumar
  • 10,214
  • 25
  • 77
  • 147
0
votes
1 answer

ControlConnection warning in datastax java driver

I am using cassandra 2.0.9 and datastax java driver 2.0.5 to query. I had set rpc_address as 0.0.0.0 in cassandra. Sometimes I am getting this warning message from the client 4411 [Cassandra Java Driver worker-1] WARN…
0
votes
1 answer

Cassandra NoHostAvailableException when deletes are executed with cqlsh

We have a cluster with 7 nodes and we use the datastax java driver to connect to the cluster. The problem is that I am getting constant NoHostAvailableException like this: Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException:…
ftrujillo
  • 1,172
  • 1
  • 16
  • 30
0
votes
1 answer

Cassandra schema model organization

How to prepare schema with Cassandra prepared a avia model schema for test. Ticket(uuid: Long, flyCompany: FlyCompany, sitNumber: Int, user: User, date: String, ... ) User(uuid: Long, firstName: String, lastName: String, ... ) Thickets, Users,…
student
  • 59
  • 1
  • 6
0
votes
1 answer

Java Spark flatMap seems to be losing items in ArrayList

I'm iterating over billions of rows in cassandra with the spark/cassandra driver and pulling out data to run statistics on. To accomplish this I am running a FOR loop over each row of data and if it falls within the criteria of a bucket of data i'm…
mithrix
  • 542
  • 1
  • 4
  • 21
0
votes
1 answer

Can Spark operate on a 64 Bit Double within Cassandra using JAVA

I am using spark to perform some statistical analysis on a 64 bit double from a Cassandra table column of type: double Example: 5.084936038014788E8 When I perform the analysis it returns nothing. After looking at the Spark documentation data…
mithrix
  • 542
  • 1
  • 4
  • 21
0
votes
1 answer

Retry all hosts forever Retry Policy?

I have some data that must be written to Cassandra. Initially I thought this would be simple by just setting up a RetryPolicy for ReadTimeout, WriteTimeout, Unavailable and RequestError. However, the only two retry decisions that I see are…
Micah Zoltu
  • 6,764
  • 5
  • 44
  • 72
0
votes
1 answer

Spark - Mapping columns to variables in JAVA from an RDD or DataFrame

I'm trying to map cassandra row columns in a Spark RDD to variables that I can interate over for manipulation within spark but can't seem to get them into a variable. I have the following code: JavaRDD rdd =…
mithrix
  • 542
  • 1
  • 4
  • 21
0
votes
1 answer

cassandra primary key conception

CREATE TABLE c1.ticket ( uuid int PRIMARY KEY, idflycompany int ) WITH bloom_filter_fp_chance = 0.01 AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} AND comment = '' AND compaction = {'class':…
user5607337
0
votes
1 answer

how to read all row from very huge table in cassandra?

I have a Cassandra cluster with two node and replica_factor=2 in same datacenter. Table in ~150 million and continuously increasing that i need to read process and update corresponding row in Cassandra once in a day. Is there any better approach…
visingh
  • 233
  • 3
  • 17
0
votes
1 answer

Cassandra Failed to create a selector. Multithreading multiple concurrent cassandra connections

I am running an ExecutorService of more than 50 threads concurrently. Each thread is opening a connection to Cassandra and performing inserts using springframework.data.cassandra. The problem is when I open more than 50 connections at a time, I get…
0
votes
1 answer

How can Datastax Java API handle consistency level as ALL in cassandra

Setup I have 4 nodes for cassandra cluster (same datacenter). Replication factor is 3. Write consistency is set to ALL As I understand, Cassandra doesn't have master node. Thus I can write data to any random node as I want. Let's say I have 03…
Xitrum
  • 7,765
  • 26
  • 90
  • 126
0
votes
1 answer

why a application using ParparedStatement, BoundStatement, Session.executeAsync and ResultSetFuture consuming such high CPU?

I need to write almost 10 million records in Cassandra(2.1.11) cluster with 3 nodes, and the replication factor is 1 , and my steps are almost as follows with datastax's Java Driver: String insert_query = "insert into " + keyspace + "." +…
abelard2008
  • 1,984
  • 1
  • 20
  • 35