cassandra-3.0

Unable to see all keyspaces in C* 2.1.7 after I downgraded from 3.0 to 2.1.7

匆匆过客 提交于 2019-12-11 07:19:44
问题 I've been using Cassandra 2.1.7 and For some reason I upgraded to 3.0.12 and later realized that some dependent apps won't work with 3.0.12 and I downgraded and using C* 2.1.7 as I was using before. But Now I'm not able to see Keyspaces in C*. (Just FYI: Data directory is same in both C*yaml files) Do I have to make any changes? Appreciate your help. 回答1: When you upgrade from 2.x to 3.x you have to run upgradesstables command in nodetool. I assume this is what you did. Now when you

Dealing with dynamic Query String in Cassandra

大憨熊 提交于 2019-12-11 07:07:30
问题 I have employee table which has following column as id, firstName, lastName, email, age. From UI, I have filter option which is coming as a query string. Let's say user want to filter data based on firstName and age, so query string will be ?firstName='John'&age>21 . I know in Cassandra, we need to create multiple tables based on criteria or use materialized view to filter the query. Question: How we will identify which table/MV(repository) it has to call based on query string coming from UI?

How many Max number of tables I can create in a given Cassandra cluster ? Is there a limit?

こ雲淡風輕ζ 提交于 2019-12-11 06:47:35
问题 Lets say I'm having 6 node cluster having m4.2xl (~ 8CPU 32GB RAM) - How many max tables I can create across keyspaces? and Is there a limit on max tables for a given Keyspace? Highly Appreciate your response! 回答1: There could be performance degradation when you have too many tables in the cluster. For every table you need to allocate an additional memory, etc. independent if anybody writes into it or not. From DataStax documentation: The table thresholds have additional dependencies on JVM

How to get current year on cassandra

老子叫甜甜 提交于 2019-12-11 06:26:40
问题 How can I get just a part of the current date in Cassandra? In my particular case I need to get just the year. I got to this for the moment select dateof(now()) from system.local; But I could not find any function to get just the year in the documentation https://docs.datastax.com/en/dse/5.1/cql/cql/cql_reference/refCqlFunction.html#refCqlFunction__toTimestamp I'm new with Cassandra so this maybe a silly question. 回答1: The safe way, would be to return a timestamp and parse-out the year client

How to bring up the new node

流过昼夜 提交于 2019-12-11 02:32:23
问题 It is a follow-up question from High Availability in Cassandra 1) Let's say we have three nodes N1, N2 and N3, I have RF =3 and WC = 3 and RC = 1, then which means I cannot handle any node failure in case of write. 2) Let's say If the N3 (Imagine It holds the data) went down and as of now we will not be able to write the data with the consistency as '3'. Question 1: Now If I bring a new Node N4 up and attach to the cluster, Still I will not be able to write to the cluster with consistency 3,

Cassandra Data modelling : Timestamp as partition keys

妖精的绣舞 提交于 2019-12-10 18:04:56
问题 I need to be able to return all users that performed an action during a specified interval. The table definition in Cassandra is just below: create table t ( timestamp from, timestamp to, user text, PRIMARY KEY((from,to), user)) I'm trying to implement the following query in Cassandra: select * from t WHERE from > :startInterval and to < :toInterval However, this query will obviously not work because it represents a range query on the partition key, forcing Cassandra to search all nodes in

Cassandra 3.9 and CQL spec version

╄→гoц情女王★ 提交于 2019-12-10 15:48:19
问题 Just curious what versions of cql are supported in Cassandra 3.9. I know that cql 3.4.2 is supported in Cassandra 3.9, but whether 3.4.3 is supported too? and how to upgrade/config Cassandra 3.9 to use cql 3.4.3? I searched on Internet, I found some information such as Which CQL version corresponds to which Cassandra version?, https://docs.datastax.com/en/landing_page/doc/landing_page/compatibility.html, and so on, but these posts can not help me. Any comments welcomed. Thanks 回答1: Just

Update a collection type of a custom type in cassandra

二次信任 提交于 2019-12-10 11:52:26
问题 How can I append a new element to a set which is in a custom type in Cassandra. custom_type is : CREATE TYPE custom_type ( normal_type TEXT, set_type Set<TEXT> ); and the table to be updated is : CREATE TABLE test_table ( id TEXT, my_type FROZEN<custom_type>, clustering_key TEXT, PRIMARY KEY ((id),clustering_key) ); Tried below query but did not work. @Query("update test_table set my_type.set_type = my_type.set_type + {'newelement'} where id=?1 and clustering_key=?2") Any Idea on how to do

Apache Cassandra upgrade 3.X from 2.1

ⅰ亾dé卋堺 提交于 2019-12-09 13:23:18
问题 Is it possible to upgrade Apache Cassandra 2.1.9+ to Apache Cassandra 3.1+ directly? The release notes for 3.0 mention direct upgrades need a minimum of Apache Cassandra 2.1.9+, but all further releases of Apache Cassandra don't mention whether an intermediate version is needed. 回答1: Yes, you can upgrade from Cassandra 2.1.9 (or higher) to Cassandra 3.1 (or higher). As stated in the DataStax dev blog in June of 2015, Cassandra moved to a "tick-tock" release cycle with version 3. The details

Many-to-many in Cassandra 3

◇◆丶佛笑我妖孽 提交于 2019-12-08 05:45:34
问题 What's the right way to model many-to-many relationships in Cassandra (using 3.10 at the moment)? From what answers I was able to find, denormalization into two relationship tables is suggested (as in here, for example: Modeling many-to-many relations in Cassandra 2 with CQL3). But there are problems with that on deletes, and those answers are so sparse they do not mention any details on that. Suppose we have the following tables: CREATE TABLE foo ( key UUID PRIMARY KEY, content TEXT ) CREATE