• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Cassandra 1.1
 

Cassandra 1.1

on

  • 4,090 views

 

Statistics

Views

Total Views
4,090
Views on SlideShare
4,087
Embed Views
3

Actions

Likes
2
Downloads
70
Comments
0

3 Embeds 3

http://snews.daze.yandex.ru 1
http://us-w1.rockmelt.com 1
https://twitter.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Cassandra 1.1 Cassandra 1.1 Presentation Transcript

    • Apache Cassandra 1.1Jonathan Ellis / @spyced©2012 DataStax
    • New features in 1.1 • CQL3 • Global row + key caches • Fine-grained data storage control • Row level isolation • Concurrent schema changes • Off-heap cache works on Windows • "Write survey mode" • Hadoop improvements • Stress tool©2012 DataStax
    • Modern Cassandra, briefly • 0.7 • CREATE COLUMN FAMILY • TTL • Secondary (column) indexes • 0.8 • Counters • Automatic memtable tuning • 1.0 • Compression • Leveled compaction©2012 DataStax
    • Global row + key caches • cassandra.yaml • key_cache_size_in_mb (default 2) • row_cache_size_in_mb (default 0) • Also save periods • Per-CF: caching=ALL|KEYS_ONLY*|ROWS_ONLY|NONE • Old CF-level options are ignored • row_cache_size, key_cache_size • save periods©2012 DataStax
    • Data storage • Old: • /var/lib/cassandra/data/Keyspace1/Standard1-hc-1-Data.db • New: • /var/lib/cassandra/data/Keyspace1/Standard1/Keyspace1- Standard1-hc-1-Data.db • (Includes KS in filename for easier bulk loading)©2012 DataStax
    • Row-level isolation • Never see partial updates to a row • We now have AID from ACID • C in ACID != C in CAP©2012 DataStax
    • Concurrent schema changes • Fixes http://wiki.apache.org/cassandra/ FAQ#schema_disagreement • Can still have temporary disagreements if you use a new CF before all nodes have it • Also speeds up adding new nodes©2012 DataStax
    • Off-heap cache on Windows • SerializingCacheProvider no longer requires JNA • SCP is the default starting with 1.0, but falls back to CLHCP if JNA is not present in < 1.1©2012 DataStax
    • Write survey mode • bin/cassandra -Dcassandra.write_survey=true • Allows experimenting w/ compaction, compression, new versions* • isolate node to test reads©2012 DataStax
    • Abortable compactions • nodetool stop <type>©2012 DataStax
    • CQL3 • (CQL2 is still default) • Composite PK support • .. slice syntax removed • ORDER BY syntax conforms to SQL©2012 DataStax
    • A simple example CREATE TABLE tweets (     tweet_id uuid PRIMARY KEY,     author varchar,     body varchar );©2012 DataStax
    • Tweetstweet_id author body To be prepared for war is one of the most 1790 gwashington effectual means of preserving peace All men having power ought to be distrusted 1787 jmadison to a certain degree Those gentlemen, who will be elected senators, will fix themselves in the federal 1778 gmason town, and become citizens of that town more than of your state©2012 DataStax
    • With clustering CREATE TABLE timeline (     user_id varchar,     tweet_id uuid,     author varchar,     body varchar,     PRIMARY KEY (user_id, tweet_id) ); partition key clustered©2012 DataStax
    • Timeline user_id tweet_id author body jadams 1787 jmadison All men ... jadams 1790 gwashington To be prepared ... ahamilton 1778 gmason Those gentlemen ... ahamilton 1790 gwashington To be prepared ... not clustered (within partition key) clustered©2012 DataStax
    • Timeline, physical layout (1787, author): (1787, body): (1790, author): (1790, body): To jadams jmadison All men ... gwashington be prepared ... (1778, author): (1778, body): (1790, author): (1790, body): To ahamilton gmason Those gentlemen ... gwashington be prepared ... Non-PK columns containstring literal of column name ©2012 DataStax
    • WITH COMPACT CREATE TABLE timeline (     user_id varchar,     tweet_id uuid,     author varchar,     body varchar,     PRIMARY KEY (user_id, tweet_id, author) ) WITH COMPACT STORAGE; All but one column • For backwards compatibility©2012 DataStax
    • (1787, jmadison): (1790, gwashington): jadams All men ... To be prepared ... (1778, gmason): (1790, gwashington): ahamilton Those gentlemen ... To be prepared ...no “body” literal ©2012 DataStax
    • Earlier changes • (1.0.6) Allow CF names to be qualified by keyspace for INSERT, ALTER, DELETE, TRUNCATE • INSERT INTO ks.cf (...) VALUES (...) • (SELECT was done in 1.0.1) • (1.0.4) ALTER CF attributes©2012 DataStax
    • cqlsh • SOURCE and CAPTURE commands • (1.0.8) DESCRIBE COLUMNFAMILIES©2012 DataStax
    • The future is CQL (based) • cqlsh • performance • prepared statements • netty-based transport (CASSANDRA-2478) • What does this mean for pycassa, Hector, et al?©2012 DataStax
    • Hadoop Integration • 2I support* • Wide row support* • BulkOutputFormat • (*Covered in updated WordCount)©2012 DataStax
    • Secondary Index support IndexExpression expr = new IndexExpression( ByteBufferUtil.bytes("int4"), IndexOperator.EQ, ByteBufferUtil.bytes(0)); ConfigHelper.setInputRange( job.getConfiguration(),©2012 DataStax
    • Wide row support ConfigHelper.setInputColumnFamily( job.getConfiguration(), KEYSPACE, COLUMN_FAMILY, true); Also: PIG_WIDEROW_INPUT©2012 DataStax
    • BulkOutputFormat job.setOutputFormatClass( BulkOutputFormat.class); • Compatible w/ CFOF + extra options • OUTPUT_LOCATION • BUFFER_SIZE_IN_MB • STREAM_THROTTLE_MBITS • (system default, 64, unlimited) • Limitation: can’t stream to dead nodes (fix in 1.1.1?)©2012 DataStax
    • Stress tool • tools/bin/stress* • Insert, read, seq scan, indexed scan, multiget, counter add/get • CQL©2012 DataStax
    • Bonus: What’s new in C* 1.1.1 • Incremental repair by token range • Support for commitlog archiving and PITR • Identify and blacklist corrupted SSTables from future compactions • Open 1 sstableScanner per level for leveled compaction • More CQL3 improvements (e.g. reversed clustering) • fix re-creating Keyspaces/ColumnFamilies with the same name as dropped ones©2012 DataStax
    • DataStax Community, with OpsCenter©2012 DataStax