spring-projects / spring-data-cassandra

Provides support to increase developer productivity in Java when using Apache Cassandra. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-cassandra/
Apache License 2.0
379 stars 311 forks source link

Add support SSTable Attached Secondary Index (SASI) creation [DATACASS-306] #420

Closed spring-projects-issues closed 7 years ago

spring-projects-issues commented 8 years ago

Yaniv Marom Nachumi opened DATACASS-306 and commented

Cassandra version higher then 3.4 is required in order to use custom index org.apache.cassandra.index.sasi.SASIIndex


Affects: 1.5 M1 (Ingalls)

Issue Links:

Referenced from: pull request https://github.com/spring-projects/spring-data-cassandra/pull/111

spring-projects-issues commented 8 years ago

Mark Paluch commented

Spring Data Cassandra 1.5 will be based on the Casandra 3.0 driver (see DATACASS-271). Please help me understand the goal of this ticket

spring-projects-issues commented 8 years ago

Yaniv Marom Nachumi commented

In Cassandra 3.4 and later, a new implementation of secondary indexes, SSTable Attached Secondary Indexes (SASI), have greatly improved the performance of secondary indexes and should be used, if possible. https://docs.datastax.com/en/cql/3.3/cql/cql_using/useSASIIndex.html

Including SSTable as this stage might prevent users from implementing an alternative solution (e.g - https://issues.apache.org/jira/browse/CASSANDRA-2915 Lucene based Secondary Indexes).

spring-projects-issues commented 8 years ago

Mark Paluch commented

This ticket depends on DATACASS-213 which creates the required infrastructure to create indexes. As of today you can use LIKE with queries (either using CqlTemplate, CassandraTemplate or @Query with repositories) since all queries are string-based

spring-projects-issues commented 8 years ago

Yaniv Marom Nachumi commented

Mark thanks for your comments. There is one limitation with your approach: String data cassandra is tested using cassandra-all 3.0.0, therefor it is unwise to create DAO based unit tests while using different cassandra-all version.

For example: We have several unit test based on AbstractEmbeddedCassandraIntegrationTest; when running using spring-data-cassandra 1.5.0-SNAPSHOT & cassandra-all 3.0.0, all test pass. But when we upgrade to cassandra-all 3.7 the following exception occur:

com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: localhost/127.0.0.1:39667 (com.datastax.driver.core.exceptions.OperationTimedOutException: [localhost/127.0.0.1] Operation timed out))

spring-projects-issues commented 8 years ago

Yaniv Marom Nachumi commented

Testing against cassandra-all version 3.5 succeeded while testing using 3.6 fails.

spring-projects-issues commented 7 years ago

John Blum commented

Committed to master for the Spring Data Cassandra Kay RC1 release