Leveled Compaction Strategy is still useful for reading when Rows Are Write-Once?

In other cases, this datastax post says that Summarization may not be a good option when the rows have Write once :

If your lines are always written completely and never updated, they will naturally always be contained in one SSTable when using size compaction. Thus, there is really nothing to gain from a leveled seal.

In addition, in an interview with the Missing Guide to the Aligned Compaction Strategy (Wei Deng and Ryan Svihla) slide 30, says Where LCS matches the best

Use cases that require very consistent read performance with a much higher read rate for writing

Widely partitioned data model with a limited (or slowly growing) number of full partitions, but many updates and deletes , or a complete TTLed dataset

I understand that if a line is updated or deleted frequently, it may end up in several SSTables, so this will affect read performance. From Aligned Compaction to Apache Cassandra

Performance can be inconsistent because there are no guarantees as to how many sstables can be distributed per row: in the worst case scenario, we could have columns from a given row in each sstable.

, , Write-Once, ?

, , SSTable, SSTables, Size Tiered Compaction, SSTables .

+4
2

, LeveledCompactionStrategy SizeTieredCompactionStrategy ( , , LCS IO)

SSTable, SSTables, Size , SSTables .

, SSTables, SSTables .

, , . , .

CREATE TABLE tablename(
   emailid text,
   sent-date date,
   column3 text,
   PRIMARY KEY (emailid,sent-date)
   )

(, hello@gmail.com) , " ". ( , upserts) , , , LeveledCompaction .

, . , SSTables, SizeTieredCompactionStrategy LeveledCompactionStrategy, SSTable.

+2

, , , , Thrift, CQL. ( , )

Thrift, ( CQL ). From CQL / ?

+--------------------------------------------------+-----------+
|                   Thrift term                    | CQL term  |
+--------------------------------------------------+-----------+
| row                                              | partition |
| column                                           | cell      |
| [cell name component or value]                   | column    |
| [group of cells with shared component prefixes]  | row       |
+--------------------------------------------------+-----------+

, CQL3 Maps Cassandras

CREATE TABLE tweets (
        ... user text,
        ... time timestamp,
        ... tweet text,
        ... lat float,
        ... long float,
        ... PRIMARY KEY (user, time)
        ... );

(, , , "" )

CQL

user         | time                     | lat    | long    | tweet
--------------+--------------------------+--------+---------+---------------------
 softwaredoug | 2013-07-13 08:21:54-0400 | 38.162 | -78.549 |  Having chest pain.
 softwaredoug | 2013-07-21 12:15:27-0400 | 38.093 | -78.573 |   Speedo self shot.
      jnbrymn | 2013-06-29 20:53:15-0400 | 38.092 | -78.453 | I like programming.
      jnbrymn | 2013-07-14 22:55:45-0400 | 38.073 | -78.659 |     Who likes cats?
      jnbrymn | 2013-07-24 06:23:54-0400 | 38.073 | -78.647 |  My coffee is cold.

Thrift,

RowKey: softwaredoug
=> (column=2013-07-13 08:21:54-0400:, value=, timestamp=1374673155373000)
=> (column=2013-07-13 08:21:54-0400:lat, value=4218a5e3, timestamp=1374673155373000)
=> (column=2013-07-13 08:21:54-0400:long, value=c29d1917, timestamp=1374673155373000)
=> (column=2013-07-13 08:21:54-0400:tweet, value=486176696e67206368657374207061696e2e, timestamp=1374673155373000)
=> (column=2013-07-21 12:15:27-0400:, value=, timestamp=1374673155407000)
=> (column=2013-07-21 12:15:27-0400:lat, value=42185f3b, timestamp=1374673155407000)
=> (column=2013-07-21 12:15:27-0400:long, value=c29d2560, timestamp=1374673155407000)
=> (column=2013-07-21 12:15:27-0400:tweet, value=53706565646f2073656c662073686f742e, timestamp=1374673155407000)
-------------------
RowKey: jnbrymn
=> (column=2013-06-29 20:53:15-0400:, value=, timestamp=1374673155419000)
=> (column=2013-06-29 20:53:15-0400:lat, value=42185e35, timestamp=1374673155419000)
=> (column=2013-06-29 20:53:15-0400:long, value=c29ce7f0, timestamp=1374673155419000)
=> (column=2013-06-29 20:53:15-0400:tweet, value=49206c696b652070726f6772616d6d696e672e, timestamp=1374673155419000)
=> (column=2013-07-14 22:55:45-0400:, value=, timestamp=1374673155434000)
=> (column=2013-07-14 22:55:45-0400:lat, value=42184ac1, timestamp=1374673155434000)
=> (column=2013-07-14 22:55:45-0400:long, value=c29d5168, timestamp=1374673155434000)
=> (column=2013-07-14 22:55:45-0400:tweet, value=57686f206c696b657320636174733f, timestamp=1374673155434000)
=> (column=2013-07-24 06:23:54-0400:, value=, timestamp=1374673155485000)
=> (column=2013-07-24 06:23:54-0400:lat, value=42184ac1, timestamp=1374673155485000)
=> (column=2013-07-24 06:23:54-0400:long, value=c29d4b44, timestamp=1374673155485000)
=> (column=2013-07-24 06:23:54-0400:tweet, value=4d7920636f6666656520697320636f6c642e, timestamp=1374673155485000)

, 2 CQL Thrift.

, CQL Thrift (, == ) , Deng Svihla - LCS

, dilsingi , , .

+1

Source: https://habr.com/ru/post/1687738/


All Articles