SlideShare a Scribd company logo
©2013 DataStax Confidential. Do not distribute without consent.
@PatrickMcFadin
Patrick McFadin
Chief Evangelist/Solution Architect - DataStax
Cassandra 2.0: Better, Stronger, Faster
Thursday, October 3, 13
Five Years of Cassandra
Jul-09 May-10 Feb-11 Dec-11 Oct-12 Jul-13
0.1 0.3 0.6 0.7 1.0 1.2
...
2.0
DSE
Jul-08
Thursday, October 3, 13
Cassandra 2.0 - Big new features
Thursday, October 3, 13
SELECT * FROM users
WHERE username = ’jbellis’
[empty resultset]
Session 1
SELECT * FROM users
WHERE username = ’jbellis’
[empty resultset]
Session 2
Lightweight transactions: the problem
INSERT INTO users
(username,password)
VALUES (’jbellis’,‘xdg44hh’)
INSERT INTO users
(userName,password)
VALUES (’jbellis’,‘8dhh43k’)
It’s a Race!
Who wins?
Thursday, October 3, 13
Client
(locks)
Coordinatorrequest
Replica
internal
request
Why Locking Doesn’t Work
• Client locks
• Write times out
• Lock released
• Hint is replayed!!
Thursday, October 3, 13
Client
(locks)
Coordinatorrequest
Replica
internal
request
X
Why Locking Doesn’t Work
• Client locks
• Write times out
• Lock released
• Hint is replayed!!
Thursday, October 3, 13
Client
(locks)
Coordinatorrequest
Replica
internal
request
hint
X
Why Locking Doesn’t Work
• Client locks
• Write times out
• Lock released
• Hint is replayed!!
Thursday, October 3, 13
Client
(locks)
Coordinatorrequest
Replica
internal
request
hint
timeout
response
X
Why Locking Doesn’t Work
• Client locks
• Write times out
• Lock released
• Hint is replayed!!
Thursday, October 3, 13
Paxos
• Consensus algorithm
• All operations are quorum-based
• Each replica sends information about unfinished operations to the leader
during prepare
• Paxos made Simple
Thursday, October 3, 13
LWT: details
• 4 round trips vs 1 for normal updates
• Paxos state is durable
• Immediate consistency with no leader election or failover
• ConsistencyLevel.SERIAL
• http://www.datastax.com/dev/blog/lightweight-transactions-in-
cassandra-2-0
Thursday, October 3, 13
LWT: Use with caution
• Great for 1% of your application
• Eventual consistency is your friend
• http://www.slideshare.net/planetcassandra/c-summit-2013-eventual-consistency-
hopeful-consistency-by-christos-kalantzis
Thursday, October 3, 13
UPDATE USERS
SET email = ’jonathan@datastax.com’, ...
WHERE username = ’jbellis’
IF email = ’jbellis@datastax.com’;
INSERT INTO USERS (username, email, ...)
VALUES (‘jbellis’, ‘jbellis@datastax.com’, ... )
IF NOT EXISTS;
Using LWT
• Don’t overwrite an existing record
• Only update record if condition is met
Thursday, October 3, 13
Triggers
CREATE TRIGGER <name> ON <table> USING <classname>;
DROP TRIGGER <name> ON [<keyspace>.]<table>;
• Executed on the coordinator before mutation
• Takes original mutation and adds any new
• Jars deployed per server
Thursday, October 3, 13
Trigger implementation
class MyTrigger implements ITrigger
{
public Collection<RowMutation> augment(ByteBuffer key, ColumnFamily update)
{
...
}
}
• You have to implement your own ITrigger (for now)
• Compile and deploy to each server
Thursday, October 3, 13
Experimental!
• Relies on internal RowMutation, ColumnFamily classes
• Not sandboxed. Be careful!
• Expect changes in 2.1
Thursday, October 3, 13
CQL Improvements
• ALTER DROP
• Remove a field from a CQL table.
• Conditional schema changes
• Only execute if condition met
CREATE KEYSPACE IF NOT EXISTS ks
WITH replication = { 'class': 'SimpleStrategy','replication_factor' :
3 };
CREATE TABLE IF NOT EXISTS test (k int PRIMARY KEY);
DROP KEYSPACE IF EXISTS ks;
ALTER TABLE users DROP address3;
Thursday, October 3, 13
CQL Improvements
• Aliases in SELECT
• Limit and TTL in prepared statements
SELECT event_id, dateOf(created_at) AS creation_date,
blobAsText(content) AS content
FROM timeline;
event_id | creation_date | content
-------------------------+--------------------------+----------------------
550e8400-e29b-41d4-a716 | 2013-07-26 10:44:33+0200 | Something happened!?
SELECT * FROM myTable LIMIT ?;
UPDATE myTable USING TTL ? SET v = 2 WHERE k = 'foo';
Thursday, October 3, 13
Cassandra 2.0 - Minor features
Thursday, October 3, 13
Query performance	
• Hint when reading time series data
• Time series slices find data faster
• Hybrid approach to Leveled Compaction under stress
• Use size tiered until we catch up
• Reduce read latency impact
• Off-heap memory speedup
• Bytes moved on and off 10x faster
• Removal of row-level bloom filters
Thursday, October 3, 13
Server performance
• Single pass compaction
• No more incremental compaction for large storage rows
• LMAX Disruptor on Thrift interface
• Crazy fast and efficient concurrent threads. Faster HSHA
• Support for pluggable off-heap memory allocators
• JEMalloc support to start. Faster memory access.
• Bigger Level 0 file size
• 5M was just too small. Now 160M
Thursday, October 3, 13
Removed features
• SuperColumns are gone!
• Not the API just the underlying implementation
• On-heap row cache
• Row cache is no longer an option in the JVM
• Memory pressure relief valves - Gone from yaml
• flush_largest_memtables_at
• reduce_cache_sizes_at
• reduce_cache_sizes_to
Thursday, October 3, 13
Operation Changes
• JDK 7 now required
• Vnodes are default
• Streaming overhaul
• Control. Streams are grouped and broken into plans
• Traceability. Each stream has an ID. Monitor each stream.
• Performance. Streams are now pipelined. No waiting for ACK
Thursday, October 3, 13
Thank you!
Apache Cassandra 2.0 - Data model on fire
Next talk in my data model series!
Thursday, October 3, 13
©2013 DataStax Confidential. Do not distribute without consent. 21
Thursday, October 3, 13

More Related Content

PDF
Advanced data modeling with apache cassandra
Patrick McFadin
 
PDF
Cassandra EU - Data model on fire
Patrick McFadin
 
PDF
Cassandra 2.0 and timeseries
Patrick McFadin
 
PDF
Cassandra 3.0 advanced preview
Patrick McFadin
 
PDF
Cassandra Basics, Counters and Time Series Modeling
Vassilis Bekiaris
 
PDF
Storing time series data with Apache Cassandra
Patrick McFadin
 
PDF
Cassandra Day SV 2014: Fundamentals of Apache Cassandra Data Modeling
DataStax Academy
 
PDF
Real data models of silicon valley
Patrick McFadin
 
Advanced data modeling with apache cassandra
Patrick McFadin
 
Cassandra EU - Data model on fire
Patrick McFadin
 
Cassandra 2.0 and timeseries
Patrick McFadin
 
Cassandra 3.0 advanced preview
Patrick McFadin
 
Cassandra Basics, Counters and Time Series Modeling
Vassilis Bekiaris
 
Storing time series data with Apache Cassandra
Patrick McFadin
 
Cassandra Day SV 2014: Fundamentals of Apache Cassandra Data Modeling
DataStax Academy
 
Real data models of silicon valley
Patrick McFadin
 

What's hot (20)

PDF
Introduction to data modeling with apache cassandra
Patrick McFadin
 
PDF
Cassandra Materialized Views
Carl Yeksigian
 
PDF
Cassandra By Example: Data Modelling with CQL3
Eric Evans
 
PDF
CQL3 in depth
Yuki Morishita
 
PDF
Cassandra nice use cases and worst anti patterns
Duyhai Doan
 
PDF
Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...
DataStax Academy
 
PPTX
DataStax: An Introduction to DataStax Enterprise Search
DataStax Academy
 
PPTX
Cassandra Summit 2015: Intro to DSE Search
Caleb Rackliffe
 
PDF
Time series with apache cassandra strata
Patrick McFadin
 
PDF
Cassandra Community Webinar | Become a Super Modeler
DataStax
 
PDF
Time series with Apache Cassandra - Long version
Patrick McFadin
 
PDF
Advanced Cassandra
DataStax Academy
 
PDF
Cassandra and Spark
datastaxjp
 
PDF
Apache Cassandra Lesson: Data Modelling and CQL3
Markus Klems
 
PDF
Introduction to Data Modeling with Apache Cassandra
DataStax Academy
 
PPTX
Cassandra Community Webinar: Back to Basics with CQL3
DataStax
 
PDF
A Cassandra + Solr + Spark Love Triangle Using DataStax Enterprise
Patrick McFadin
 
PDF
The world's next top data model
Patrick McFadin
 
PDF
Cassandra Day Chicago 2015: Advanced Data Modeling
DataStax Academy
 
PDF
Advanced Data Modeling with Apache Cassandra
DataStax Academy
 
Introduction to data modeling with apache cassandra
Patrick McFadin
 
Cassandra Materialized Views
Carl Yeksigian
 
Cassandra By Example: Data Modelling with CQL3
Eric Evans
 
CQL3 in depth
Yuki Morishita
 
Cassandra nice use cases and worst anti patterns
Duyhai Doan
 
Cassandra Day Atlanta 2015: Building Your First Application with Apache Cassa...
DataStax Academy
 
DataStax: An Introduction to DataStax Enterprise Search
DataStax Academy
 
Cassandra Summit 2015: Intro to DSE Search
Caleb Rackliffe
 
Time series with apache cassandra strata
Patrick McFadin
 
Cassandra Community Webinar | Become a Super Modeler
DataStax
 
Time series with Apache Cassandra - Long version
Patrick McFadin
 
Advanced Cassandra
DataStax Academy
 
Cassandra and Spark
datastaxjp
 
Apache Cassandra Lesson: Data Modelling and CQL3
Markus Klems
 
Introduction to Data Modeling with Apache Cassandra
DataStax Academy
 
Cassandra Community Webinar: Back to Basics with CQL3
DataStax
 
A Cassandra + Solr + Spark Love Triangle Using DataStax Enterprise
Patrick McFadin
 
The world's next top data model
Patrick McFadin
 
Cassandra Day Chicago 2015: Advanced Data Modeling
DataStax Academy
 
Advanced Data Modeling with Apache Cassandra
DataStax Academy
 
Ad

Viewers also liked (9)

PPT
Toronto jaspersoft meetup
Patrick McFadin
 
PDF
Cassandra data modeling talk
Patrick McFadin
 
PDF
Building Antifragile Applications with Apache Cassandra
Patrick McFadin
 
PDF
Cassandra at scale
Patrick McFadin
 
PDF
Owning time series with team apache Strata San Jose 2015
Patrick McFadin
 
PDF
Become a super modeler
Patrick McFadin
 
PDF
Cassandra Virtual Node talk
Patrick McFadin
 
PDF
The data model is dead, long live the data model
Patrick McFadin
 
PDF
Apache cassandra & apache spark for time series data
Patrick McFadin
 
Toronto jaspersoft meetup
Patrick McFadin
 
Cassandra data modeling talk
Patrick McFadin
 
Building Antifragile Applications with Apache Cassandra
Patrick McFadin
 
Cassandra at scale
Patrick McFadin
 
Owning time series with team apache Strata San Jose 2015
Patrick McFadin
 
Become a super modeler
Patrick McFadin
 
Cassandra Virtual Node talk
Patrick McFadin
 
The data model is dead, long live the data model
Patrick McFadin
 
Apache cassandra & apache spark for time series data
Patrick McFadin
 
Ad

Similar to Cassandra 2.0 better, faster, stronger (20)

PDF
GemStone/S Update
ESUG
 
PDF
Aioug vizag oracle12c_new_features
AiougVizagChapter
 
PDF
Presto At Treasure Data
Taro L. Saito
 
PPTX
Exchange Server 2013 Database and Store Changes
Microsoft TechNet - Belgium and Luxembourg
 
PDF
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
C4Media
 
PDF
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Jignesh Shah
 
PPT
11g R2
afa reg
 
PPTX
"But It Worked In Development!" - 3 Hard SQL Server Problems
Brent Ozar
 
PDF
What can we learn from NoSQL technologies?
Ivan Zoratti
 
PDF
Tuning Autovacuum in Postgresql
Mydbops
 
PDF
GLOC 2014 NEOOUG - Oracle Database 12c New Features
Biju Thomas
 
PPTX
Migration to ClickHouse. Practical guide, by Alexander Zaitsev
Altinity Ltd
 
PDF
A Practical Multi-Tenant Cluster
Command Prompt., Inc
 
PPTX
Debugging Skynet: A Machine Learning Approach to Log Analysis - Ianir Ideses,...
DevOpsDays Tel Aviv
 
PPTX
Developing on SQL Azure
Ike Ellis
 
PPTX
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
DataStax
 
PDF
Deploying postgre sql on amazon ec2
Denish Patel
 
PDF
IT PRO|DEV CONNECTIONS 2013 - The X-Files of SQL Server
Antonios Chatzipavlis
 
PPTX
My Database Skills Killed the Server
ColdFusionConference
 
PPT
Fudcon talk.ppt
webhostingguy
 
GemStone/S Update
ESUG
 
Aioug vizag oracle12c_new_features
AiougVizagChapter
 
Presto At Treasure Data
Taro L. Saito
 
Exchange Server 2013 Database and Store Changes
Microsoft TechNet - Belgium and Luxembourg
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
C4Media
 
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Jignesh Shah
 
11g R2
afa reg
 
"But It Worked In Development!" - 3 Hard SQL Server Problems
Brent Ozar
 
What can we learn from NoSQL technologies?
Ivan Zoratti
 
Tuning Autovacuum in Postgresql
Mydbops
 
GLOC 2014 NEOOUG - Oracle Database 12c New Features
Biju Thomas
 
Migration to ClickHouse. Practical guide, by Alexander Zaitsev
Altinity Ltd
 
A Practical Multi-Tenant Cluster
Command Prompt., Inc
 
Debugging Skynet: A Machine Learning Approach to Log Analysis - Ianir Ideses,...
DevOpsDays Tel Aviv
 
Developing on SQL Azure
Ike Ellis
 
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
DataStax
 
Deploying postgre sql on amazon ec2
Denish Patel
 
IT PRO|DEV CONNECTIONS 2013 - The X-Files of SQL Server
Antonios Chatzipavlis
 
My Database Skills Killed the Server
ColdFusionConference
 
Fudcon talk.ppt
webhostingguy
 

More from Patrick McFadin (10)

PDF
Successful Architectures for Fast Data
Patrick McFadin
 
PDF
Open source or proprietary, choose wisely!
Patrick McFadin
 
PDF
An Introduction to time series with Team Apache
Patrick McFadin
 
PDF
Laying down the smack on your data pipelines
Patrick McFadin
 
PDF
Help! I want to contribute to an Open Source project but my boss says no.
Patrick McFadin
 
PDF
Analyzing Time Series Data with Apache Spark and Cassandra
Patrick McFadin
 
PDF
Apache cassandra and spark. you got the the lighter, let's start the fire
Patrick McFadin
 
PDF
Nike Tech Talk: Double Down on Apache Cassandra and Spark
Patrick McFadin
 
PDF
Introduction to cassandra 2014
Patrick McFadin
 
PDF
Making money with open source and not losing your soul: A practical guide
Patrick McFadin
 
Successful Architectures for Fast Data
Patrick McFadin
 
Open source or proprietary, choose wisely!
Patrick McFadin
 
An Introduction to time series with Team Apache
Patrick McFadin
 
Laying down the smack on your data pipelines
Patrick McFadin
 
Help! I want to contribute to an Open Source project but my boss says no.
Patrick McFadin
 
Analyzing Time Series Data with Apache Spark and Cassandra
Patrick McFadin
 
Apache cassandra and spark. you got the the lighter, let's start the fire
Patrick McFadin
 
Nike Tech Talk: Double Down on Apache Cassandra and Spark
Patrick McFadin
 
Introduction to cassandra 2014
Patrick McFadin
 
Making money with open source and not losing your soul: A practical guide
Patrick McFadin
 

Recently uploaded (20)

PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 

Cassandra 2.0 better, faster, stronger

  • 1. ©2013 DataStax Confidential. Do not distribute without consent. @PatrickMcFadin Patrick McFadin Chief Evangelist/Solution Architect - DataStax Cassandra 2.0: Better, Stronger, Faster Thursday, October 3, 13
  • 2. Five Years of Cassandra Jul-09 May-10 Feb-11 Dec-11 Oct-12 Jul-13 0.1 0.3 0.6 0.7 1.0 1.2 ... 2.0 DSE Jul-08 Thursday, October 3, 13
  • 3. Cassandra 2.0 - Big new features Thursday, October 3, 13
  • 4. SELECT * FROM users WHERE username = ’jbellis’ [empty resultset] Session 1 SELECT * FROM users WHERE username = ’jbellis’ [empty resultset] Session 2 Lightweight transactions: the problem INSERT INTO users (username,password) VALUES (’jbellis’,‘xdg44hh’) INSERT INTO users (userName,password) VALUES (’jbellis’,‘8dhh43k’) It’s a Race! Who wins? Thursday, October 3, 13
  • 5. Client (locks) Coordinatorrequest Replica internal request Why Locking Doesn’t Work • Client locks • Write times out • Lock released • Hint is replayed!! Thursday, October 3, 13
  • 6. Client (locks) Coordinatorrequest Replica internal request X Why Locking Doesn’t Work • Client locks • Write times out • Lock released • Hint is replayed!! Thursday, October 3, 13
  • 7. Client (locks) Coordinatorrequest Replica internal request hint X Why Locking Doesn’t Work • Client locks • Write times out • Lock released • Hint is replayed!! Thursday, October 3, 13
  • 8. Client (locks) Coordinatorrequest Replica internal request hint timeout response X Why Locking Doesn’t Work • Client locks • Write times out • Lock released • Hint is replayed!! Thursday, October 3, 13
  • 9. Paxos • Consensus algorithm • All operations are quorum-based • Each replica sends information about unfinished operations to the leader during prepare • Paxos made Simple Thursday, October 3, 13
  • 10. LWT: details • 4 round trips vs 1 for normal updates • Paxos state is durable • Immediate consistency with no leader election or failover • ConsistencyLevel.SERIAL • http://www.datastax.com/dev/blog/lightweight-transactions-in- cassandra-2-0 Thursday, October 3, 13
  • 11. LWT: Use with caution • Great for 1% of your application • Eventual consistency is your friend • http://www.slideshare.net/planetcassandra/c-summit-2013-eventual-consistency- hopeful-consistency-by-christos-kalantzis Thursday, October 3, 13
  • 12. UPDATE USERS SET email = ’[email protected]’, ... WHERE username = ’jbellis’ IF email = ’[email protected]’; INSERT INTO USERS (username, email, ...) VALUES (‘jbellis’, ‘[email protected]’, ... ) IF NOT EXISTS; Using LWT • Don’t overwrite an existing record • Only update record if condition is met Thursday, October 3, 13
  • 13. Triggers CREATE TRIGGER <name> ON <table> USING <classname>; DROP TRIGGER <name> ON [<keyspace>.]<table>; • Executed on the coordinator before mutation • Takes original mutation and adds any new • Jars deployed per server Thursday, October 3, 13
  • 14. Trigger implementation class MyTrigger implements ITrigger { public Collection<RowMutation> augment(ByteBuffer key, ColumnFamily update) { ... } } • You have to implement your own ITrigger (for now) • Compile and deploy to each server Thursday, October 3, 13
  • 15. Experimental! • Relies on internal RowMutation, ColumnFamily classes • Not sandboxed. Be careful! • Expect changes in 2.1 Thursday, October 3, 13
  • 16. CQL Improvements • ALTER DROP • Remove a field from a CQL table. • Conditional schema changes • Only execute if condition met CREATE KEYSPACE IF NOT EXISTS ks WITH replication = { 'class': 'SimpleStrategy','replication_factor' : 3 }; CREATE TABLE IF NOT EXISTS test (k int PRIMARY KEY); DROP KEYSPACE IF EXISTS ks; ALTER TABLE users DROP address3; Thursday, October 3, 13
  • 17. CQL Improvements • Aliases in SELECT • Limit and TTL in prepared statements SELECT event_id, dateOf(created_at) AS creation_date, blobAsText(content) AS content FROM timeline; event_id | creation_date | content -------------------------+--------------------------+---------------------- 550e8400-e29b-41d4-a716 | 2013-07-26 10:44:33+0200 | Something happened!? SELECT * FROM myTable LIMIT ?; UPDATE myTable USING TTL ? SET v = 2 WHERE k = 'foo'; Thursday, October 3, 13
  • 18. Cassandra 2.0 - Minor features Thursday, October 3, 13
  • 19. Query performance • Hint when reading time series data • Time series slices find data faster • Hybrid approach to Leveled Compaction under stress • Use size tiered until we catch up • Reduce read latency impact • Off-heap memory speedup • Bytes moved on and off 10x faster • Removal of row-level bloom filters Thursday, October 3, 13
  • 20. Server performance • Single pass compaction • No more incremental compaction for large storage rows • LMAX Disruptor on Thrift interface • Crazy fast and efficient concurrent threads. Faster HSHA • Support for pluggable off-heap memory allocators • JEMalloc support to start. Faster memory access. • Bigger Level 0 file size • 5M was just too small. Now 160M Thursday, October 3, 13
  • 21. Removed features • SuperColumns are gone! • Not the API just the underlying implementation • On-heap row cache • Row cache is no longer an option in the JVM • Memory pressure relief valves - Gone from yaml • flush_largest_memtables_at • reduce_cache_sizes_at • reduce_cache_sizes_to Thursday, October 3, 13
  • 22. Operation Changes • JDK 7 now required • Vnodes are default • Streaming overhaul • Control. Streams are grouped and broken into plans • Traceability. Each stream has an ID. Monitor each stream. • Performance. Streams are now pipelined. No waiting for ACK Thursday, October 3, 13
  • 23. Thank you! Apache Cassandra 2.0 - Data model on fire Next talk in my data model series! Thursday, October 3, 13
  • 24. ©2013 DataStax Confidential. Do not distribute without consent. 21 Thursday, October 3, 13