Book Image

Cassandra High Performance Cookbook

By : Edward Capriolo
Book Image

Cassandra High Performance Cookbook

By: Edward Capriolo

Overview of this book

<p>Apache Cassandra is a fault-tolerant, distributed data store which offers linear scalability allowing it to be a storage platform for large high volume websites. <br /><br />This book provides detailed recipes that describe how to use the features of Cassandra and improve its performance. Recipes cover topics ranging from setting up Cassandra for the first time to complex multiple data center installations. The recipe format presents the information in a concise actionable form.<br /><br />The book describes in detail how features of Cassandra can be tuned and what the possible effects of tuning can be. Recipes include how to access data stored in Cassandra and use third party tools to help you out. The book also describes how to monitor and do capacity planning to ensure it is performing at a high level. Towards the end, it takes you through the use of libraries and third party applications with Cassandra and Cassandra integration with Hadoop.</p>
Table of Contents (20 chapters)
Cassandra High Performance Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

CLI operations with super columns


Super columns add another level of nesting over standard columns. The CLI allows inserts to super columns much like inserts of normal columns. They can be read with get, written with set, and deleted with del. The super column version of these commands uses an extra ['xxx'] to represent the extra level of the map called the sub-column.

How to do it...

  1. Create a column family named supertest using the clause 'with column_type=super':

    [default@testkeyspace] create column family supertest with column_type='Super';   
    
  2. Now, insert data. Notice super columns have an extra level of the map ['XXX']:

    [default@test..] set supertest['mynewcar']['parts']['engine']='v8';
    [default@test..] set supertest['mynewcar']['parts']['wheelsize']='20"';
    [default@test..] set supertest['mynewcar']['options']['cruise control']='yes';
    [default@test..] set supertest['mynewcar']['options']['heated seats']='yes';  
    
  3. Use assume so CLI formats the columns as ASCII text, and then fetch all the...