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

Cassandra showing abrupt behaviour

I have one unit test in which I am writing and reading from cassandra multiple times. future = function(Cassandra update with value x) - async //write and read updated value value = future.get(); //reading print value; assert value == x; //doing…
user801154
0
votes
2 answers

Querying 2 cells from each partition in cassandra using cql

I am new to cassandra, I am using cassandra datastax driver to access my keyspace. I have a legacy table which is created by using cassandra thrift client. I am in need of retrieving two column values from each partion in one query. It is like…
0
votes
1 answer

Timeout due to Repair

Off late I am getting a quite a lot of exception for a table that is designed using LeveledCompactionStrategy. com.datastax.driver.core.exceptions.ReadTimeoutException: Cassandra timeout during read query at consistency LOCAL_QUORUM (timeout…
Ananth
  • 971
  • 9
  • 23
0
votes
1 answer

Cassandra Java Exception - NoHostAvailableException

I have setup single Cassandra node on VM. i have to create a table with 70000 columns. for this i have written java code that read json file and create table. here is my java code snippet. When i run my java code it throws exception after creation…
New User
  • 59
  • 1
  • 2
  • 4
0
votes
1 answer

Cassandra CQL3 java example for wide rows

I have a data model as below using CQL3 CREATE TABLE test( userid text, entry_date timestamp, attributes map, primary key (userid,entry_date) ); Map contains lot of data. I need to have a search based on map key as well…
0
votes
1 answer

How to insert data into a 4 node cassandra cluster using datastax cassandra-core-api?

I had a single node (DataStax) Casandra cluster , in which I had to insert some 10gb of data from a file. I wrote a java program to read the file and store the data as foll : import java.io.BufferedReader; import java.io.FileReader; import…
Syed Ammar Mustafa
  • 373
  • 1
  • 7
  • 18
0
votes
1 answer

Cassandra Spring mvc - how to pass value

I try this and work fine. @Autowired private CassandraOperations cassandraOperations; in my method { String cqlAll = "select * from customer where cust_id=123"; List results = cassandraOperations.select(cqlAll, Customer.class); …
0
votes
1 answer

Chunked data writes with the Datastax Java driver

When using Astyanax as the client library for Cassandra there's a Chunked Object Store feature for storing large files. I can't find any documentation or examples related to the Datastax driver that shows that I can store large files like Astyanax…
Sven
  • 892
  • 14
  • 29
0
votes
1 answer

Exception in thread "main" java.lang.IllegalArgumentException: location.city is not a column defined in this metadata

Here is my CQL tables CREATE TYPE ks_demo.location ( lat float, lon float, locName text, city text, state text, country text, pin int ); create table publishMsg ( rowKey uuid, msgId timeuuid, postedBy text, postedById uuid, …
Manish Kumar
  • 10,214
  • 25
  • 77
  • 147
0
votes
1 answer

How exactly batch work in cql

I was going through datastax CQL Java Driver 2.1 driver document and also through CQL 2.X reference pdf: In CQL reference pdf: Batches are atomic by default. In the context of a Cassandra batch operation, atomic means that if any of the batch…
Manish Kumar
  • 10,214
  • 25
  • 77
  • 147
0
votes
1 answer

Pattern in Spring to append Keyspace to tables dynamically?

In Spring Data - Cassandra (SDC), I want to reuse the same DataStax driver Session, but access different Keyspaces depending on which tenant (in a multi-tenant SaaS model) is accessing Cassandra at the moment. That said, it appears in my research…
0
votes
1 answer

Altering a column family in cassandra in a multiple node topology

I'm having the following issue when trying to alter cassandra: I'm altering the table straight forward: ALTER TABLE posts ADD is_black BOOLEAN; on a single-node environment, both under EC2 server and on localhost everything work perfect - select,…
Nativ
  • 3,092
  • 6
  • 38
  • 69
0
votes
1 answer

Cassandra Read Timeouts in 5 minute interval consistently?

Can anyone explain why there could be read timeouts happening in my Cassandra cluster every 4-5 minute interval. I could almost see this consistently and be able to reproduce this consistently. The read throughput was kept at 1 request per second,…
0
votes
1 answer

I am getting an InvalidTypeException whenever I am using the row.getToken("fieldname")?

for the following piece of code I am getting an InvalidTypeException whenever I am using the row.getToken("fieldname"). Record RowToRecord(Row rw) { ColumnDefinitions cd = rw.getColumnDefinitions(); Record rec = new Record(); int i; …
0
votes
1 answer

Datastax java driver Date Filter Issue

I have a table with one timestamp column . When i try to execute a date filter using this timestamp column it doesn't give any results. Table structure and code segment is follows. create table status_well ( wid int, data_time timestamp, …