datastax-java-driver

Getting BusyPoolException com.datastax.spark.connector.writer.QueryExecutor , what wrong me doing?

╄→гoц情女王★ 提交于 2019-12-24 20:53:29
问题 I am using spark-sql-2.4.1 ,spark-cassandra-connector_2.11-2.4.1 with java8 and apache cassandra 3.0 version. I have my spark-submit or spark cluster environment as below to load 2 billion records. --executor-cores 3 --executor-memory 9g --num-executors 5 --driver-cores 2 --driver-memory 4g Using following configurration cassandra.concurrent.writes=1500 cassandra.output.batch.size.rows=10 cassandra.output.batch.size.bytes=2048 cassandra.output.batch.grouping.key=partition cassandra.output

com.datastax.driver.core.exceptions.InvalidQueryException using Datastax Java driver

本小妞迷上赌 提交于 2019-12-24 12:39:50
问题 I created my column family like this from the CLI- create column family profile with key_validation_class = 'UTF8Type' and comparator = 'UTF8Type' and default_validation_class = 'UTF8Type' and column_metadata = [ {column_name : account, validation_class : 'UTF8Type'} {column_name : advertising, validation_class : 'UTF8Type'} {column_name : behavior, validation_class : 'UTF8Type'} {column_name : info, validation_class : 'UTF8Type'} ]; Now I was trying to insert into this column family using

Discover nodes from another datacenter

纵然是瞬间 提交于 2019-12-24 00:44:40
问题 Is it possible to discover list of nodes from another datacenter in a Cassandra cluster? Let us say I have the following information: My Cassandra cluster consists of multiple datacenters (say "dc1" and "dc2"). I know an IP address of one of the nodes from, say, datacenter "dc1". Using the datastax java library I have tried to do the following: read list of peers directly from the system.peers table - but it returns just a few of them (it was read with consistency level ALL ), all belonging

Cassandra BoundStatement with limit

不想你离开。 提交于 2019-12-23 18:16:48
问题 I am using PreparedStatement and BoundStatement to execute some Cassandra queries. The problem is, I am trying to use a limit on these. This is what I have: selectByDatasetIdAndTimePreparedStatement = getSession().prepare( QueryBuilder.select() .all() .from(KEYSPACE_NAME, TABLE_NAME) .where(QueryBuilder.eq(AFFILIATION_ID_COLUMN, QueryBuilder.bindMarker())) .and(QueryBuilder.eq(DATASET_ID_COLUMN, QueryBuilder.bindMarker())) .and(QueryBuilder.lte(TIME_COLUMN, QueryBuilder.bindMarker())) //

Datastax Cassandra - Inheritance when using object mapper

余生颓废 提交于 2019-12-23 15:14:27
问题 I try using Cassandra for persisting quite simple POJOs, but using a class hierarchy (many subclasses, one superclass). I am using Java and the Datastax driver (and the object mapper). My problem is that the Object Mapper doesn't seem to recognize fields annotated in superclasses. The structure I implemented is: @Table(keyspace = "...", name = "...") public class Subclass extends Superclass { public double x; public double y; public double z; .... } public class Superclass { @PartitionKey(0)

Kundera with Datastax DS Driver Connection Port

依然范特西╮ 提交于 2019-12-23 05:14:30
问题 I'm using Kundera with Datastax DS Driver for Cassandra connection. On persistence.xml, I defined the port as 9042. However, I noticed that that Kundera failed to connect to Cassandra: Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.503 sec <<< FAILURE! - in com.abc.DataServiceImplTest writeReadTest(com.abc.DataServiceImplTest) Time elapsed: 0.38 sec <<< ERROR! com.impetus.kundera.configure.schema.SchemaGenerationException: Error while opening socket, Caused by: . at com

Unable to get Cassandra to Work in Basic Applcation

我们两清 提交于 2019-12-23 05:09:43
问题 This is my current error: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /127.0.0.1 (com.datastax.driver.core.TransportException: [/127.0.0.1] Unexpected exception triggered (java.lang.NoClassDefFoundError: Could not initialize class com.datastax.driver.core.Codec))) com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:186) com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:81) com

Datastax cassandra driver giving wrong metadata information about host states

感情迁移 提交于 2019-12-23 02:48:07
问题 I got a cluster with 2 DCs and each DC contain 2 nodes. DC1: 192.168.60.81 192.168.60.82 DC2: 192.168.60.242 192.168.60.247 Application is connected to 192.168.60.81 and hence the local DC for the application is DC1. Situation 1: Initially when all the nodes are up and when I try to get cluster.metadata.allHosts , it gives me information about the state of the host as UP. Situation 2: When any of the nodes in local datacenter (DC1) goes up or down, the cluster.metadata.allHosts gives me the

Datastax java driver 3.0.0 Enumerated annotation not found

。_饼干妹妹 提交于 2019-12-22 10:59:12
问题 Hope I am reading the docs well: http://docs.datastax.com/en/developer/java-driver/3.0/java-driver/reference/crudOperations.html. The Enumerated annotation If your class contains an enum type field, you use the Enumerated annotation. I have a Java enum and I want to use the @Enumerated annotation, but I can't seem to find it in 3.0.0 version of the driver, it was present in 2.1.9. $ find . -type f -name \*.jar|while read i; do echo ====== $i =====; jar -tf $i|grep Enumerated; done ====== .

What should be datatype for timeuuid in datastax mapper class?

一世执手 提交于 2019-12-22 01:09:15
问题 Datatype for one of the column in cassandra table is timeuuid . While creating my Mapper class as per docs, I am not sure of data type I should use for timeuuid column. I understand that it should be an equivalent Java data type and hence I tried java.util.Date. Refer column definition and Mapper class column definition as below start timeuuid @PartitionKey(1) @Column(name="start") private UUID start; I get the below during CRUD operation Codec not found for requested operation: [timeuuid ->