cassandra
What’s the difference between creating a table and creating a columnfamily in Cassandra?
To answer the original question you posed: a column family and a table are the same thing. The name “column family” was used in the older Thrift API. The name “table” is used in the newer CQL API. More info on the APIs can be found here: http://wiki.apache.org/cassandra/API If you need to use “group by,order … Read more
Not enough replica available for query at consistency ONE (1 required but only 0 alive)
You are likely getting this error because the Replication Factor of the keyspace the table you are querying belongs to has a Replication Factor of one, is that correct? If the partition you are reading / updating does not have enough available replicas (nodes with that data) to meet the consistency level, you will get … Read more
Getting Cassandra datacenter name in cqlsh
cqlsh> use system; cqlsh:system> select data_center from local; data_center ————- datacenter1
How to do a join queries with 2 or more tables in cassandra cql
Cassandra = No Joins. Your model is 100% relational. You need to rethink it for Cassandra. I would advice you take a look at these slides. They dig deep into how to model data for cassandra. Also here is a webinar covering the topic. But stop thinking foreign keys and joining tables, because if you … Read more
Comparison : Aerospike vs Cassandra [closed]
Choosing between Cassandra and Aerospike really depends on your use case more than anything. I have personally used both as a production system for the same project and for me Aerospike was the clear winner but that’s because our use case is to have highly concurrent, low latency, transactional, small updates to billions of entries … Read more
Results pagination in Cassandra (CQL)
You don’t need to use tokens, if you are using Cassandra 2.0+. Cassandra 2.0 has auto paging. Instead of using token function to create paging, it is now a built-in feature. Now developers can iterate over the entire result set, without having to care that it’s size is larger than the memory. As the client … Read more
What are the differences between a node, a cluster and a datacenter in a cassandra nosql database?
The hierarchy of elements in Cassandra is: Cluster Data center(s) Rack(s) Server(s) Node (more accurately, a vnode) A Cluster is a collection of Data Centers. A Data Center is a collection of Racks. A Rack is a collection of Servers. A Server contains 256 virtual nodes (or vnodes) by default. A vnode is the data … Read more
Is there a clear equivalent of ‘show keyspaces’ in cqlsh 2?
Very simple. Just enter this command in your cqlsh shell and enjoy select * from system.schema_keyspaces; In C*3.x, we can simply use describe keyspaces
What is the purpose of Cassandra’s commit log?
You can think of the commit log as an optimization, but Cassandra would be unusably slow without it. When MemTables get written to disk we call them SSTables. SSTables are immutable, meaning once Cassandra writes them to disk it does not update them. So when a column changes Cassandra needs to write a new SSTable … Read more