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

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.

Is there a reason not to use SparkContext.getOrCreate when writing a spark job?

TL;DR There are many legitimate applications of the getOrCreate methods but attempt to find a loophole to perform map-side joins is not one of them. In general there is nothing deeply wrong with SparkContext.getOrCreate. The method has its applications, and although there some caveats, most notably: In its simplest form it doesn’t allow you to … Read more

Cassandra port usage – how are the ports used?

@Schildmeijer is largely right, however port 7001 is still used when using TLS Encrypted Internode communication So my complete list would be for current versions of Cassandra: 7199 – JMX (was 8080 pre Cassandra 0.8.xx) 7000 – Internode communication (not used if TLS enabled) 7001 – TLS Internode communication (used if TLS enabled) 9160 – … Read more

Inner Join in cassandra CQL

Because of its distributed nature, Cassandra has no support for RDBMS style joins. You have a few options for when you want something like a join. One option perform separate queries and then have your application join the data itself. This makes sense if the data is relatively small and you only have to perform … Read more

cassandra get all records in time range

The timeout is because Cassandra is taking longer than the timeout (default is 10 seconds) to return the data. For your query, Cassandra will attempt to fetch the entire dataset before returning. For more than a few records this can easily take longer than the timeout. For queries that are producing lots of data you … Read more

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