Is there any way in which using Spring Data a query can be executed on all keyspaces in Cassandra?
相关问题
- Spring Data MongoDB - lazy access to some fields
- What version of Java does Cassandra 3 require
- Filter from Cassandra table by RDD values
- R2DBC and enum (PostgreSQL)
- cassandra: can you query against a collection fiel
相关文章
- Cassandra Read a negative frame size
- Two foreign keys as primary key
- How does cassandra split keyspace data when multip
- How does Cassandra scale horizontally ?
- Spring Session Data Redis - Get Valid Sessions, Cu
- NoSQL Injection? (PHP->phpcassa->Cassandra)
- Executing CQL through Shell Script?
- Spark and Cassandra Java Application Exception Pro
There are two parts to this answer:
CassandraTemplate
instances for each keyspace you want to use.SessionFactory
interface to control whichSession
to use. We ship with routingSessionFactory
support so you can provide multiple sessions and a discriminator (usually somethingThreadLocal
-based) to select the appropriateSession
.Some example code for 2.0 would look like: