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

What implications does consistency have on async writes?

Both Datastax Python and Java Cassandra drivers supports async writes. Both of them also allows setting consistency level. Does the consistency level have any implication whatsoever for async writes?
Ztyx
  • 14,100
  • 15
  • 78
  • 114
0
votes
4 answers

Does anyone have working syntax for CQL UPDATE with preparedStatement() they can share with me?

When I do a INSERT things go well: String insertText = "INSERT INTO alpha_screen (alpha, screen) VALUES (?,?)"; PreparedStatement preparedStatement = InsertWordCount.PrepareText(insertText); BoundStatement boundStatement =…
0
votes
1 answer

Using Custom Classes in Collection Types using DataStax's Java Driver

Is there a way to use our types (classes we provide) in the the collection types that we provide to the DataStax Java Driver through the BoundStatement.setSet(..) method without using User Defined Types? Perhaps with the Object Mapping API? And if…
peterl
  • 1,881
  • 4
  • 21
  • 34
0
votes
1 answer

Spring batch with cassandra native driver

Can anyone show an example of using latest Spring batch framework with Cassandra? How to set the driver class if I use the thrift driver from Datastax?
0
votes
0 answers

Cassandra MappingManager.mapper(...) is blocking

I am a Cassandra newbie and I am encountering an issue regarding the object-mapping API. I have a mapped class like this: @Table(keyspace = "analytics", name = "events") public class CassandraEventRecord { @PartitionKey private String id; private…
Deniz Acay
  • 1,609
  • 1
  • 13
  • 24
0
votes
1 answer

How to retry asynchronous writes on failure in datastax-jdbc?

I am using datastax driver to do cassandra writes asynchronously, would like to see if there is a way to retry writes on failure. It does not seem to contain the request in Throwable throwable during failure. public void…
0
votes
2 answers

InvalidQueryException when trying to create column family in Cassandra via unit

I have a 3 node cassandra cluster and via my unit test in Java, I first create a keyspace and then create a column family within that keyspace. Sometimes the unit tests passes but randomly I keep getting the following error. I am using the latest…
0
votes
2 answers

cassandra single node connection error

i am trying to use cassandra as database for an app i am working on. The app is a Netbeans platform app. In order to start the cassandra server on my localhost i issue Runtime.getRuntime().exec(command) where command is the string to start the…
user3498704
  • 23
  • 1
  • 4
0
votes
1 answer

Store simple key-value pairs in Cassandra 2+

currently we're using HBase to store our data. Therefore we created an abstract class that holds a Map, and this map is then stored via the Java API. a sample class would be class User extends AHBase { public static String columnName =…
divadpoc
  • 903
  • 10
  • 31
0
votes
1 answer

use datastax java driver to bind data for where in clause

I know somebody has ask this question (http://www.datastax.com/support-forums/topic/java-driver-cql-3-bound-statements-in-clause#post-13114, Prepared Statement with collection in IN clause in Datastax Cassandra CQL driver) However, I still do not…
jixuan1989
  • 79
  • 2
  • 6
0
votes
1 answer

Fetchsize for large result

I'm using the Datastax Java driver and have a partition key that has around 750000 items that I'd like to iterate over. I currently hit a ReadTimeoutException. Will setting Statement#setFetchSize(2000) be all I need to do to avoid the timeout…
Ztyx
  • 14,100
  • 15
  • 78
  • 114
0
votes
1 answer

Datastax driver exception while instantiating UDT mapper for list of user defined types

I am trying to use Datastax's UDT mapper for a table which contains the list of UDT's. The driver throws an exception while trying to instantiate the UDTmapper. It seems to be unable to map the list of instances of the class which represents my UDT.…
MrkK
  • 873
  • 3
  • 12
  • 22
0
votes
2 answers

Datastax Cassandra bulkloader

I am attempting to use the JMX BulkLoader to ETL data into Cassandra from a remote node onto the cluster https://github.com/PatrickCallaghan/datastax-analytics-example/blob/master/src/main/java/com/datastax/jmxloader/JmxBulkLoader.java However after…
user2780187
  • 677
  • 7
  • 16
0
votes
0 answers

Datastax driver Issue getting TransportException

I'm using datastax driver version 2.0.8 and soon after my app initializes, I see TransportException error from datastax. I've looked up online and found and a jira ticket opened on a similar issue from datastax…
0
votes
2 answers

datastax cassandra java driver batch delete performance behavior

If I have 500k rows to delete, should I form a batch of 100 rows for delete? i.e. 100 rows at a time? What is the performance characteristics? Other than network round trip, would the server be benefited from the batching? Thanks
simonso
  • 595
  • 1
  • 8
  • 19