cassandra-2.0

Cassandra control SSTable size

我是研究僧i 提交于 2019-12-01 17:03:26
Is there a way I could control max size of a SSTable, for example 100 MB so that when there is actually more than 100MB of data for a CF, then Cassandra creates next SSTable? Unfortunately the answer is not so simple, the sizes of your SSTables will be influenced by your compaction Strategy and there is no direct way to control your max sstable size. SSTables are initially created when memtables are flushed to disk as SSTables. The size of these tables initially depends on your memtable settings and the size of your heap ( memtable_total_space_in_mb being a large influencer). Typically these

Cassandra control SSTable size

有些话、适合烂在心里 提交于 2019-12-01 15:06:10
问题 Is there a way I could control max size of a SSTable, for example 100 MB so that when there is actually more than 100MB of data for a CF, then Cassandra creates next SSTable? 回答1: Unfortunately the answer is not so simple, the sizes of your SSTables will be influenced by your compaction Strategy and there is no direct way to control your max sstable size. SSTables are initially created when memtables are flushed to disk as SSTables. The size of these tables initially depends on your memtable

Cassandra upgrade from 2.0.x to 2.1.x or 3.0.x

风流意气都作罢 提交于 2019-12-01 12:18:15
I've searched for previous versions of this question, but none seem to fit my case. I have an existing Cassandra cluster running 2.0.x. I've been allocated new VMs, so I do NOT want to upgrade my existing Cassandra nodes - rather I want to migrate to a) new VMs and b) a more current version of Cassandra. I know for in-place upgrades, I would upgrade to the latest 2.0.x, then to the latest 2.1.x. AFAIK, there's no SSTable inconsistency here. If I go this route via addition of new nodes, I assume I would follow the datastax instructions for adding new nodes/decommissioning old nodes? Given the

Cassandra CQL select query not returning records which have timestamp as clusterkey

纵然是瞬间 提交于 2019-12-01 11:05:05
Cassandra CQL: Table created with composite key and cluster key. When I try to execute select * from partition key then I able to retrieve all data and it works for relational operator ( < or > ) too . But when I queried for particular cluster key using equal-to(=) operator with proper value it returns 0 rows. Table: CREATE TABLE entity_data ( received_date timestamp, entity text, received_time timestamp, node int, primary key ((received_date ,entity),received_time)); Data ( select * from entity): received_date | entity | received_time | node_id 2014-09-24 00:00:00+0400 | NA | 2014-09-24 18:56

Cassandra upgrade from 2.0.x to 2.1.x or 3.0.x

邮差的信 提交于 2019-12-01 11:02:58
问题 I've searched for previous versions of this question, but none seem to fit my case. I have an existing Cassandra cluster running 2.0.x. I've been allocated new VMs, so I do NOT want to upgrade my existing Cassandra nodes - rather I want to migrate to a) new VMs and b) a more current version of Cassandra. I know for in-place upgrades, I would upgrade to the latest 2.0.x, then to the latest 2.1.x. AFAIK, there's no SSTable inconsistency here. If I go this route via addition of new nodes, I

Cassandra sample trigger to get the deleted row and column values

谁说胖子不能爱 提交于 2019-12-01 09:27:40
问题 ITrigger augment method is invoked when there is update in a column family. How do we know if the update operation is insert or delete? Also, is it possible to execute any DML statements in other tables in the same keyspace in the trigger implementation? Assume that there are two tables test1 and test2. Trigger is created for test1. If there is any delete operation in test1, how do we execute DML statements for test2 in the trigger implementation? 回答1: Here is the code to check the update

Does Cassandra write to a node(which is up) even if Consistency cannot be met?

天涯浪子 提交于 2019-12-01 08:22:30
The below statement from Cassandra documentation is the reason for my doubt. For example, if using a write consistency level of QUORUM with a replication factor of 3, Cassandra will replicate the write to all nodes in the cluster and wait for acknowledgement from two nodes. If the write fails on one of the nodes but succeeds on the other, Cassandra reports a failure to replicate the write on that node. However, the replicated write that succeeds on the other node is not automatically rolled back. Ref : http://docs.datastax.com/en/cassandra/2.1/cassandra/dml/dml_atomicity_c.html So does

Cassandra CQL select query not returning records which have timestamp as clusterkey

不问归期 提交于 2019-12-01 07:51:44
问题 Cassandra CQL: Table created with composite key and cluster key. When I try to execute select * from partition key then I able to retrieve all data and it works for relational operator ( < or > ) too . But when I queried for particular cluster key using equal-to(=) operator with proper value it returns 0 rows. Table: CREATE TABLE entity_data ( received_date timestamp, entity text, received_time timestamp, node int, primary key ((received_date ,entity),received_time)); Data ( select * from

How to ensure data consistency in Cassandra on different tables?

天大地大妈咪最大 提交于 2019-12-01 02:53:50
I'm new in Cassandra and I've read that Cassandra encourages denormalization and duplication of data. This leaves me a little confused. Let us imagine the following scenario: I have a keyspace with four tables: A,B,C and D. CREATE TABLE A ( tableID int, column1 int, column2 varchar, column3 varchar, column4 varchar, column5 varchar, PRIMARY KEY (column1, tableID) ); Let us imagine that the other tables (B,C,D) have the same structure and the same data that table A, only with a different primary key, in order to respond to other queries. If I upgrade a row in table A how I can ensure

Cassandra read timeout

混江龙づ霸主 提交于 2019-12-01 02:43:59
问题 I am pulling big amount of data from cassandra 2.0, but unfortunately getting timeout exception. My table: CREATE KEYSPACE StatisticsKeyspace WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 3 }; CREATE TABLE StatisticsKeyspace.HourlyStatistics( KeywordId text, Date timestamp, HourOfDay int, Impressions int, Clicks int, AveragePosition double, ConversionRate double, AOV double, AverageCPC double, Cost double, Bid double, PRIMARY KEY(KeywordId, Date, HourOfDay) ); CREATE