Questions tagged [cassandra]

Apache Cassandra is a highly scalable, eventually consistent, distributed, structured row store. Questions about Cassandra server administration should be asked on https://dba.stackexchange.com/questions/tagged/cassandra .

Apache Cassandra is a highly scalable, eventually consistent, distributed, structured row/column store. Cassandra brings together the distributed systems technologies from Dynamo and the data model from Google's . Like , Cassandra is eventually consistent. Like BigTable, Cassandra provides a ColumnFamily-based data model richer than typical key/value systems.

Cassandra's Dynamo-based cluster model provides linear scalability and fault tolerance on commodity hardware or cloud infrastructure. Its support for replicating across multiple data centers is best-in-class, providing low latency and the ability to survive entire data center outages.

Cassandra's data model offers the convenience of column indexes with the performance of log-structured updates and powerful built-in caching with the fastest write performance as compared to other database solutions and makes it a compelling option for big data processing. It provides linear scalability with the provision to add/remove nodes on the fly without downtime.

Cassandra was open-sourced by Facebook in 2008 and quickly became a top-level Apache project. Today, it's widely used by companies in many markets.

Official links:

Documentation

Useful Links:

20596 questions
60
votes
6 answers

MongoDB vs. Cassandra vs. MySQL for real-time advertising platform

I'm working on a real-time advertising platform with a heavy emphasis on performance. I've always developed with MySQL, but I'm open to trying something new like MongoDB or Cassandra if significant speed gains can be achieved. I've been reading…
James Simpson
  • 13,488
  • 26
  • 83
  • 108
60
votes
3 answers

Switching from MySQL to Cassandra - Pros/Cons?

For a bit of background - this question deals with a project running on a single small EC2 instance, and is about to migrate to a medium one. The main components are Django, MySQL and a large number of custom analysis tools written in python and…
viksit
  • 7,542
  • 9
  • 42
  • 54
59
votes
8 answers

How to create auto increment IDs in Cassandra

We know that it is easy to create auto increment IDs in SQL databases, is there a good solution for it in Cassandra? The IDs should be for key or column name.
Andy Wan
  • 1,090
  • 2
  • 11
  • 23
59
votes
3 answers

Cassandra server throws java.lang.AssertionError: DecoratedKey(...) != DecoratedKey

I'm currently experimenting around with Cassandra. On the client-side (with Hector) I look up a few keys like this: ColumnFamilyResult result = template.queryColumns(Arrays.asList("key1","key2","key3")); Most of the time it seems…
Gamlor
  • 12,978
  • 7
  • 43
  • 70
58
votes
7 answers

cassandra - Saved cluster name Test Cluster != configured name

How am I supposed to bot a new Cassandra node when I get this error? INFO [SSTableBatchOpen:1] 2014-02-25 01:51:17,132 SSTableReader.java (line 223) Opening /var/lib/cassandra/data/system/local/system-local-jb-5 (5725 bytes) ERROR [main] 2014-02-25…
Tampa
  • 75,446
  • 119
  • 278
  • 425
56
votes
1 answer

Spring boot test "No qualifying bean of type available"

I'm quite a newbie to Spring boot, but here's the problem I'm facing now: // Application.java public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } @Autowired private…
fengye87
  • 2,433
  • 4
  • 24
  • 41
56
votes
4 answers

Does an UPDATE become an implied INSERT

For Cassandra, do UPDATEs become an implied INSERT if the selected row does not exist? That is, if I say UPDATE users SET name = "Raedwald" WHERE id = 545127 and id is the PRIMARY KEY of the users table, and the table has no row with a key of…
Raedwald
  • 46,613
  • 43
  • 151
  • 237
54
votes
2 answers

How do secondary indexes work in Cassandra?

Suppose I have a column family: CREATE TABLE update_audit ( scopeid bigint, formid bigint, time timestamp, record_link_id bigint, ipaddress text, user_zuid bigint, value text, PRIMARY KEY ((scopeid, formid), time) ) WITH CLUSTERING…
Aftab
  • 938
  • 1
  • 9
  • 20
54
votes
6 answers

How do I delete all data in a Cassandra column family?

I'm looking for a way to delete all of the rows from a given column family in cassandra. This is the equivalent of TRUNCATE TABLE in SQL.
Ike Walker
  • 64,401
  • 14
  • 110
  • 109
53
votes
4 answers

How to auto generate uuid in cassandra CQL 3 command line

Just learning cassandra, is there a way to insert a UUID using CQL, ie create table stuff (uid uuid primary key, name varchar); insert into stuff (name) values('my name'); // fails insert into stuff (uid, name) values(1, 'my name'); // fails Can…
Jay
  • 19,649
  • 38
  • 121
  • 184
50
votes
2 answers

Inserting a hard-coded UUID via CQLsh (Cassandra)

Would like to populate some static test data via a CQLsh script. This doesn't work: (device_id is UUID) insert into devices (device_id, geohash,name, external_identifier, measures, tags) values ('c37d661d-7e61-49ea-96a5-68c34e83db3a','9q9p3yyrn1',…
Chris H
  • 665
  • 1
  • 7
  • 10
50
votes
4 answers

Difference between UPDATE and INSERT in Cassandra?

What is the difference between UPDATE and INSERT when executing CQL against Cassandra? It looks like there used to be no difference, but now the documentation says that INSERT does not support counters while UPDATE does. Is there a "preferred"…
Chris Dutrow
  • 48,402
  • 65
  • 188
  • 258
48
votes
2 answers

What is the purpose of Cassandra's commit log?

Please some one clarify for me to understand Commit Log and its use. In Cassandra, while writing to Disk is the commit log the first entry point or MemTables. If Memtables is what is getting flushed to disk, what is the use of Commit log, is the…
Satheesh
  • 565
  • 1
  • 6
  • 7
48
votes
4 answers

How to use Cassandra in Django framework

Is there any robust way of implementing Cassandra back end to a web application developed using Django web framework?
Switch
  • 14,783
  • 21
  • 69
  • 110
48
votes
6 answers

Row count of a column family in Cassandra

Is there a way to get a row count (key count) of a single column family in Cassandra? get_count can only be used to get the column count. For instance, if I have a column family containing users and wanted to get the number of users. How could I do…
Henri Liljeroos
  • 511
  • 1
  • 4
  • 4