Questions tagged [cassandra-2.0]

Cassandra 2.0 is a NoSQL database sponsored by Apache.

Cassandra 2.0 is a NoSQL database sponsored by Apache.

Cassandra advertises itself to have the following merits:

  1. Proven (used by many large established companies);
  2. Performant (peforms consistently well on NoSQL benchmarks);
  3. Fault tolerant (data is automatically replicated to multiple nodes for fault-tolerance. Replication across multiple data centers is supported. Failed nodes can be replaced with no downtime.);
  4. Decentralized (there are no single points of failure and no network bottlenecks. Every node in the cluster is identical);
  5. Durable (durability is the property that writes, once completed, will survive permanently, even if the server is killed or crashes or loses power.); and
  6. Elastic (read and write throughput both increase linearly as new machines are added, with no downtime or interruption to applications);
1327 questions
66
votes
11 answers

How to obtain number of rows in Cassandra table

This is a super basic question but it's actually been bugging me for days. Is there a good way to obtain the equivalent of a COUNT(*) of a given table in Cassandra? I will be moving several hundreds of millions of rows into C* for some load testing…
Evan Volgas
  • 2,900
  • 3
  • 19
  • 30
65
votes
4 answers

How to run cql files (.cql) from within cqlsh?

The problem that I am having is that I want to run the following command (and I can't): cqlsh < cql_directory/cql_create_stuff.cql Because I have not logged in to cqlsh. So I logged in: cqlsh -u 'my_username' -p 'my_super_secret_password' and now…
Charlie Parker
  • 5,884
  • 57
  • 198
  • 323
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
52
votes
16 answers

Apache Cassandra: Unable to gossip with any seeds

I have built Cassandra server 2.0.3, then run it. It is starting and then stopped with messages: X:\MyProjects\cassandra\apache-cassandra-2.0.3-src\bin>cassandra.bat >log.txt java.lang.RuntimeException: Unable to gossip with any seeds at…
ZedZip
  • 5,794
  • 15
  • 66
  • 119
38
votes
3 answers

Cassandra "no viable alternative at input"

I am trying to insert a simple row into the table. Can someone point out what is happening here ? CREATE TABLE recommendation_engine_poc.user_by_category ( game_category text, customer_id text, amount double, …
Adelin
  • 18,144
  • 26
  • 115
  • 175
34
votes
5 answers

Executing CQL through Shell Script?

I am trying to execute the CQL commands from shell script. I am able to connect to the cqlsh (CQL version i'm using is 1.1.18) but unable to send the queries to cql. Any ideas or suggestion how to proceed on this? Do I need to connect to Cassandra…
Immadisetty
  • 341
  • 1
  • 3
  • 3
31
votes
3 answers

How does cassandra find the node that contains the data?

I've read quite a few articles and a lot of question/answers on SO about Cassandra but I still can't figure out how Cassandra decides which node(s) to go to when it's reading the data. First, some assumptions about an imaginary cluster: Replication…
kha
  • 19,123
  • 9
  • 34
  • 67
26
votes
4 answers

how do i know if nodetool repair is finished

I have a 2 node apache cassandra (2.0.3) cluster with rep factor of 1. I change rep factor to 2 using the following command in cqlsh ALTER KEYSPACE "mykeyspace" WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 2 }; I then…
user3865568
  • 261
  • 1
  • 3
  • 4
25
votes
3 answers

How do atomic batches work in Cassandra?

How can atomic batches guarantee that either all statements in a single batch will be executed or none?
Stefan Podkowinski
  • 5,206
  • 1
  • 20
  • 25
24
votes
2 answers

Efficient way to store a JSON string in a Cassandra column?

Cassandra newbie question. I'm collecting some data from a social networking site using REST calls. So I end up with the data coming back in JSON format. The JSON is only one of the columns in my table. I'm trying to figure out what the "best…
user2337270
  • 1,183
  • 2
  • 10
  • 27
24
votes
4 answers

How to list column families in keyspace?

How can I get list of all column families in keyspace in Cassandra using CQL 3?
newbie
  • 24,286
  • 80
  • 201
  • 301
23
votes
3 answers

Export large amount of data from Cassandra to CSV

I'm using Cassandra 2.0.9 for store quite big amounts of data, let's say 100Gb, in one column family. I would like to export this data to CSV in fast way. I tried: sstable2json - it produces quite big json files which are hard to parse - because…
KrzysztofZalasa
  • 251
  • 1
  • 2
  • 7
19
votes
4 answers

Cassandra Java driver: how many contact points is reasonable?

In Java I connect to Cussandra cluster as this: Cluster cluster = Cluster.builder().addContactPoints("host-001","host-002").build(); Do I need to specify all hosts of the cluster in there? What If I have a cluster of 1000 nodes? Do I randomly…
henry
  • 607
  • 2
  • 8
  • 15
18
votes
1 answer

cannot connect to cassandra docker with cqlsh

I'm run Cassandra docker container: docker pull cassandra run --name cassandra -p 9042:9042 -p 9160:9160 -d cassandra The netstat -tpln is: Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name LISTEN - tcp6 0 …
Alexandre Kalendarev
  • 681
  • 2
  • 10
  • 24
18
votes
6 answers

Create keyspace automatically inside docker container with cassandra

I was wondering if someone has tried to build a cassandra docker image with default keyspace, I've tried to do it on BUILD time but it doesn't work because cassandra is not running in that phase. It was something similar to this: FROM…
jossemarGT
  • 273
  • 1
  • 3
  • 12
1
2 3
88 89