Skip to content
Advertisement

Tag: cassandra

Cassandra UDF: getting error on checking null values

I wrote an UDF like the below: And I get this error: InvalidRequest: Error from server: code=2200 [Invalid query] message=”Java source compilation failed: Line 1: The operator != is undefined for the argument type(s) long, null Line 1: The operator != is undefined for the argument type(s) double, null” While in manuals these comparisons seems ok (e.g. here). I am

How do I increase the default timeout in the Cassandra Java driver using the DriverConfigLoader?

Small question regarding a Spring Webflux Reactive Cassandra application please. On a setup Spring Boot 2.6.4 with Webflux and reactive Cassandra, I am using the app to insert some data in Cassandra tables. Things works fine, until when there is a higher load, I am seeing an issue (stack trace attached) The thing is, reading some documentation, I thought this

Asynchronous inserts to cassandra with save order of inserts per key

I have an ordered set of incoming events and I need to insert them into Cassandra. I want to take advantage of the speed of asynchronous inserts, but my incoming events may have duplicates by key of target table. If I understand correctly, then asynchronous insertions can’t guarantee data consistency in this case, since asynchronous executions imply the program order

why is my maven sub dependency version for spark connector package different from others

I am trying to use a pom file from a existing project and I am getting an error “Cannot resolve org.yaml:snakeyaml:1.15” What I find out about this error is that the com.datastax.spark:spark-cassandra-connector_2.11:2.5.0 uses a couple dependencies and a couple levels down it is using snakeyaml:1.15 which is quarantined by company proxy. Is there a way to specify for a given

I have declared primary using PartitionKey annotation but still getting Entity Order does not declare a primary key

I have the following POJO: Getting the exception at the following code: The definition of connectionManager is here: https://pastebin.com/b3GKJuV6 The exception is as: I am implementing by following the documentation here: https://docs.datastax.com/en/developer/java-driver/4.2/manual/mapper/ . What could be the possible cause of this? EDIT:- Adding the schema definition: Answer Full Edit : There are a few things going on here which confuses

I am trying to write a DAO interface using Datastax 4.2.2, but getting several compile errors

I have the following POJO: And now I am writing the OrderDao as following: And when I do ./gradlew build I get the following errors: I am implementing by following the documentation here: https://docs.datastax.com/en/developer/java-driver/4.2/manual/mapper/ . What could be the possible cause of this? Thanks. Answer You are missing the @Entity annotation on your Order class:

cannot insert list of maps to Apache Cassandra

This is my schema insert query generated by java is in this form issue is with ‘=’ sign in the map objects in the list of maps. How can I insert it correctly? in java. Answer map value should be specified as {key1:val1, key2:val2} (see docs), in your case it should be a but really, you shouldn’t generate literal query

Advertisement