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

Getting "Write attempt on defunct connection" Error From Datastax Cassandra Java Driver

I have a web service application using Cassandra 2.0 and Datastax java driver 2.0.2. I sometimes get the stacktrace below when trying to write to/read from database, especially if the application has been sitting there for a while (like overnight).…
0
votes
2 answers

memory leak - metrics-meter-tick-thread and New I/O client worker

I am running spring-mvc application. When i was closing Tomcat server, it shows SEVERE: The web application [/myapp] appears to have started a thread named [metrics-meter-tick-thread-1] but has failed to stop it. This is very likely to create a…
Manish Kumar
  • 10,214
  • 25
  • 77
  • 147
0
votes
1 answer

Read Time Out Exception in Cassandra using cassandra-driver-core

I am writing a Java application which reads the data from MySQL and stores it in Cassandra as Sqoop does not support a direct import to Cassandra. I am using Producer-Consumer framework to achieve the same due to high number of records (in millions)…
Nayan
  • 353
  • 3
  • 5
  • 16
0
votes
1 answer

Cassandra-all dependency failing

I have included cassandra-all in my gradle dependencies list. Here is it: compile 'org.apache.cassandra:cassandra-all:2.1.0-beta2' But when I am trying to build, it is failing with the following exception: > Could not find…
Prasanth
  • 1,005
  • 5
  • 19
  • 39
0
votes
2 answers

Ability to write to a particular cassandra node

Is there a possibility to write to a particular node using datastax driver? For example, I have three nodes in datacenter 1 and three nodes in datacenter 2. Existing If i build up the cluster with any one of them as seed, all the nodes will get…
Ananth
  • 971
  • 9
  • 23
0
votes
0 answers

JSP: Foreach custom object

I'm using Datastax Java Driver and JSP. In java, I can use this code. Both ResultSet and Row are from Datastax java driver. ResultSet results = a.selectAccumulationByDate(); for (Row row : results) { …
Andrei Dharma
  • 47
  • 2
  • 9
0
votes
0 answers

Datastax 1.2 java driver

I'm running DSE 3.2.1 and using datastax java driver cassandra-driver-core-1.0.5-dse.jar Can confirm DSE is up and listener configured: # lsof -p 27418 |grep -i listen |sed 's/^/ /' java 27418 alan 202u IPv4 120289525 0t0 …
0
votes
2 answers

Cassandra: Truncating a table twice throws consistency exception

I have a scalatest suite that's failing, and I have narrowed the cause down to the code that runs before tests and truncates a data table. If I run the following code I can recreate the problem session.execute(s"TRUNCATE…
Chris Beach
  • 4,302
  • 2
  • 31
  • 50
0
votes
1 answer

Java API for handling collections in Cassandra CQL

I am looking for a java API which can handle collections in Cassandra. Which has methods to read/update/insert/delete collections like list/set/map in a column value. I am using Hector client now, I did not find any methods which could perform the…
0
votes
2 answers

Is it possible to execute SOLR 4.0 spatial queries from CQL against DSE Search 3.2.0 instance?

Is it possible to execute SOLR 4.0 spatial queries from CQL against DSE Search 3.2.0 instance? If yes, what is the correct syntax? In particular my question is about CQL queries referring to a field of a type implemented using…
0
votes
1 answer

How do I control transaction in Datastax java driver

We are planning to Use datastax 2.0. driver in our application . We have following scenario in our application .There are two different transactions, one for increasing the consumption and the other for decreasing the consumption that can be done at…
0
votes
2 answers

org.jboss.netty.channel.ChannelPipelineException: Failed to initialize a pipeline

I have an application that connects to Cassandra using the Java Driver, fetches some configuration and based on the results generates and executes some PIG scripts. Now, I am able to successfully connect to Cassandra, when jars required for PIG are…
0
votes
1 answer

How to set ttl in a column family using hive

I Am using Datastax for Cassandra and on top of CFS , Iam trying to load the data using Hive.Cassandra having TTL(time to live) at column level while insering and updating.My question is how can we achive the same TTL when we load the data using…
0
votes
1 answer

Cassandra CQL table INSERT and INDEX issue

I am using the below table in our use case - create table test_new ( employee_id text, employee_name text, value text, last_modified_date timeuuid, primary key (employee_id, last_modified_date) ); create index…
AKIWEB
  • 19,008
  • 67
  • 180
  • 294
0
votes
0 answers

Making a Cassandra Connection inside Hadoop MapReduce Task

I am successfully using the DataStax Java Driver to access Cassandra inside my Java code just before I start a MapReduce Job. cluster = Cluster.builder().addContactPoint("127.0.0.1").build(); However I am needing to check additional information…
John
  • 29,788
  • 18
  • 89
  • 130