datastax-java-driver

Cassandra Query Performance: Using IN clause for one portion of the composite partition key

穿精又带淫゛_ 提交于 2021-02-10 05:42:11
问题 I currently have a table set up in Cassandra that has either text, decimal or date type columns with a composite partition key of a business_date and an account_number. For queries to this table, I need to be able to support look-ups for a single account, or for a list of accounts, for a given date. Example: select x,y,z from my_table where business_date = '2019-04-10' and account_number IN ('AAA', 'BBB', 'CCC') //Note: Both partition keys are provided for this query I've been struggling to

Cassandra Query Performance: Using IN clause for one portion of the composite partition key

大城市里の小女人 提交于 2021-02-10 05:41:48
问题 I currently have a table set up in Cassandra that has either text, decimal or date type columns with a composite partition key of a business_date and an account_number. For queries to this table, I need to be able to support look-ups for a single account, or for a list of accounts, for a given date. Example: select x,y,z from my_table where business_date = '2019-04-10' and account_number IN ('AAA', 'BBB', 'CCC') //Note: Both partition keys are provided for this query I've been struggling to

Cassandra Query Performance: Using IN clause for one portion of the composite partition key

感情迁移 提交于 2021-02-10 05:41:15
问题 I currently have a table set up in Cassandra that has either text, decimal or date type columns with a composite partition key of a business_date and an account_number. For queries to this table, I need to be able to support look-ups for a single account, or for a list of accounts, for a given date. Example: select x,y,z from my_table where business_date = '2019-04-10' and account_number IN ('AAA', 'BBB', 'CCC') //Note: Both partition keys are provided for this query I've been struggling to

Datastax QueryBuilder insert statement

我是研究僧i 提交于 2021-02-07 20:21:06
问题 What would be the right way to build a insert statement with QueryBuilder from Datastax Java Driver for Cassandra I am using Cassandra 2.x with Java Driver 2.0.0-rc1 I know i could use a prepared statement to achieve the same but i am looking forward to using the QueryBuilder @Test public void testTableInsert() { Insert insert = QueryBuilder .insertInto(KEYSPACE_NAME, TABLE_NAME) .value("username", "jdoe") .value("first", "John") .value("last", "Doe"); System.out.println(insert.toString());

Cassandra data stax driver update 4.4 query timeout issues

隐身守侯 提交于 2020-12-11 06:24:13
问题 our application was recently upgraded to cassandra datastax driver 4.4.X. Earlier it was on version 3.3. After the upgrade we noticed quite a lot of timeout issues for ex: init query timeout session query timeout control connection timeout.. and other timeout parameters defaulted in reference.conf Earlier this used to work with default parameter but after the upgrade we need to default this to > 5 seconds. Have any one faced similar issue after the upgrade? 回答1: You need to upgrade to at

Spring-data-cassandra: Error creating bean with name 'sessionFactory' and Cannot resolve reference to bean 'cassandraTemplate'

喜你入骨 提交于 2020-07-10 08:34:11
问题 I have a springboot app, in which I am connecting to cassandra DB. My pom.xml: parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.6.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-cassandra</artifactId> </dependency> The cassandraConfig definitition: @Configuration @PropertySource("file:///Users