How to fix the “Found Netty’s native epoll transport in the classpath, but epoll is not available. Using NIO instead” warning?

If you are running on Linux, you can use the native Linux driver. For instance, if you are using Maven, add a dependency like this: <dependency> <groupId>io.netty</groupId> <artifactId>netty-transport-native-epoll</artifactId> <version>4.0.27.Final</version> <classifier>linux-x86_64</classifier> </dependency> An alternative, you can suppress the warning by setting -Dcom.datastax.driver.FORCE_NIO=true. As it is only a performance optimization, it is a viable option to ignore … Read more

com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured table schema_keyspaces

The problem is that Spring Data Cassandra (as of December 2015 when I write this) does not provide support for Cassandra 3.x. Here’s an excerpt from a conversation with one of the developers in the #spring channel on freenode: [13:49] <_amicable> Hi all, does anybody know if spring data cassandra supports cassandra 3.x? All dependencies … Read more

Is there any query for Cassandra as same as SQL:LIKE Condition?

Since Cassandra 3.4 (3.5 recommended), LIKE queries can be achieved using a SSTable Attached Secondary Index (SASI). For example: CREATE TABLE cycling.cyclist_name ( id UUID PRIMARY KEY, lastname text, firstname text ); Creating the SASI as follows: CREATE CUSTOM INDEX fn_prefix ON cyclist_name (firstname) USING ‘org.apache.cassandra.index.sasi.SASIIndex’; Then a prefix LIKE query is working: SELECT * … Read more

How do secondary indexes work in Cassandra?

select * from update_audit where scopeid=35 and formid=78005 and record_link_id=9897; How the above query will work internally in cassandra? Essentially, all data for partition scopeid=35 and formid=78005 will be returned, and then filtered by the record_link_id index. It will look for the record_link_id entry for 9897, and attempt to match-up entries that match the rows … Read more

Cassandra cqlsh – how to show microseconds/milliseconds for timestamp columns?

In an effort to answer your questions, I did a little digging on this one. Does Cassandra capture microseconds with timestamp data type? Microseconds no, milliseconds yes. If I create your table, insert a row, and try to query it by the truncated time, it doesn’t work: aploetz@cqlsh:stackoverflow> INSERT INTO data (datetime, id, type, data) … Read more

Cassandra cqlsh – connection refused

You need to edit cassandra.yaml on the node you are trying to connect to and set the node ip address for rpc_address and listen_address and restart Cassandra. rpc_address is the address on which Cassandra listens to the client calls. listen_address is the address on which Cassandra listens to the other Cassandra nodes.

Elasticsearch vs Cassandra vs Elasticsearch with Cassandra

One of our applications uses data that is stored into both Cassandra and ElasticSearch. We use Cassandra to access those records whenever we can, and have data duplicated into query tables designed to adhere to specific application-side requests. For a more liberal search than our query tables can allow, ElasticSearch performs that functionality nicely. We … Read more