Licensed under a Creative Commons Attribution-NonCommercial 3.0 New Zealand License #CASSANDRASUMMIT LESSER KNOWN FEATURES OF CASSANDRA 2.1 Licensed under a Creative Commons Attribution-NonCommercial 3.0 New Zealand License Aaron Morton @aaronmorton Co-Founder & Principal Consultant
83
Embed
Cassandra Summit 2014: Lesser Known Features of Cassandra 2.1
Presenter: Aaron Morton, Apache Cassandra Committer & Co-Founder of The Last Pickle Apache Cassandra 2.0 and 2.1 include a wealth of new and updated features. Some are well known, others are known to only a few. But any of them could help you reduce latency, improve throughput, or make operations easier. This talk will take a deep dive into features that improve: Compaction, Write Performance, Memory Management, CQL 3, TTL and Tombstones, & Repair. Existing and new users will benefit from this wide ranging view of the features Apache Cassandra offers.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Licensed under a Creative Commons Attribution-NonCommercial 3.0 New Zealand License
#CASSANDRASUMMIT
LESSER KNOWN FEATURES OF CASSANDRA 2.1
Licensed under a Creative Commons Attribution-NonCommercial 3.0 New Zealand License
Add Paranoid Disk Failure Option (CASSANDRA-6646) !
disk_failure_policy: stop_paranoid !
Implement STOP behaviour for CorruptSSTableException.
Commit Log Failure Handling (CASSANDRA-6364) !
commit_failure_policy: stop !
Commit Log Failure Handling (CASSANDRA-6364) !
ERROR [PERIODIC-COMMIT-LOG-SYNCER] 2014-… CommitLog.java:350 - Failed to persist commits to disk. Commit disk failure policy is stop; terminating thread !
java.io.IOException: Something broke. at org.apache.cassandra.db.commitlog.AbstractCommitLogService $1.run(AbstractCommitLogService.java:123) at java.lang.Thread.run(Thread.java:744)
Maintain a maximum combined buffer size for all file
readers.
Improve 2.1 flush defaults (CASSANDRA-7551) !
# memtable_flush_writers defaults to the smaller of (number of # disks, number of cores), with a minimum of 2 and a maximum of 8. # # If your data directories are backed by SSD, you should increase # this to the number of cores. # memtable_flush_writers: 8
New concurrent_compactors Defaults (CASSANDRA-7139)!
# concurrent_compactors defaults to the smaller of (number # of disks, number of cores), with a minimum of 2 and a # maximum of 8. # # If your data directories are backed by SSD, you should # increase this to the number of cores. # concurrent_compactors: 1
Throw Error When Frame Too Large (CASSANDRA-5981)!
# native_transport_max_frame_size_in_mb: 256 !
Improves Existing Behaviour, InvalidRequestException now
Add listen_interface and rpc_interface (CASSANDRA-7417)!
rpc_interface: eth1 !
listen_interface: eth0
Add listen_interface and rpc_interface (CASSANDRA-7417)
Must have a only one IP Address.
Drop queries reading many Tombstones (CASSANDRA-6117)
Replaces tombstone_debug_threshold
Drop queries reading many Tombstones (CASSANDRA-6117)!
tombstone_warn_threshold: 1000
Drop queries reading many Tombstones (CASSANDRA-6117)WARN [main] … !
SliceQueryFilter.java:236 - Read 2 live and 4 tombstoned cells in system.schema_columnfamilies (see tombstone_warn_threshold). 2147483631 columns was requested, slices=[-], delInfo={deletedAt=-9223372036854775808, localDeletion=2147483647}
Drop query that using Tombstones (CASSANDRA-6117)!
tombstone_failure_threshold: 100000
Drop query that using Tombstones (CASSANDRA-6117)!
ERROR [SharedPool-Worker-7] … !
SliceQueryFilter.java:212 - Scanned over 100000 tombstones in system.schema_columns; query aborted (see tombstone_fail_threshold)
Log a Warning for Large Batches (CASSANDRA-6487)!
batch_size_warn_threshold_in_kb: 5
Log a Warning for Large Batches (CASSANDRA-6487)!
WARN [Native-Transport-Requests:553]… !
BatchStatement.java (line 228) Batch of prepared statements for [Keyspace1.Standard1] is of size 6165, exceeding specified threshold of 5120 by 1045.
Preemptive opening compaction result (CASSANDRA-6916)
nodetool getlogginglevels Logger Name Log Level ROOT INFO com.thinkaurelius.thrift ERROR org.apache.cassandra.db.Row DEBUG
Add listsnapshots To nodetool (CASSANDRA-5742)!
nodetool listsnapshots !
Snapshot Details: Snapshot name Keyspace name Column family True size Size on disk pre-migration Keyspace1 Standard1 508.03 MB 555.59 MB all-good Keyspace1 Standard1 549.01 MB 803.68 MB !
Total TrueDiskSpaceUsed: 1.03 GB
Add Snapshot Space Used To cfstats (CASSANDRA-6231) !
Table: Standard1 SSTable count: 4 Space used (live), bytes: 76875505 Space used (total), bytes: 76875505 Space used by snapshots (total), bytes: 1108391939
CREATE TABLE temperature ( weatherstation_id text, event_time timestamp, temperature text, PRIMARY KEY (weatherstation_id,event_time) );
Track min/max Clustered Values (CASSANDRA-5514)!
SELECT event_time, temperature FROM temperature WHERE weatherstation_id='1234ABCD' AND event_time >= '2013-04-03 07:01:00' AND event_time <= '2013-04-03 07:04:00';
Track min/max Clustered Values (CASSANDRA-5514)
Skips SSTables that will not contain relevant data.
The Take Away
Use Cassandra v2.0.10 !
Get testing on v2.1.0
Thanks. #CASSANDRASUMMIT
!
Licensed under a Creative Commons Attribution-NonCommercial 3.0 New Zealand License
Aaron Morton @aaronmorton
!
Co-Founder & Principal Consultant www.thelastpickle.com
!
Licensed under a Creative Commons Attribution-NonCommercial 3.0 New Zealand License