Apache Cassandra Essentials
eBook - ePub

Apache Cassandra Essentials

  1. 172 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Apache Cassandra Essentials

Book details
Book preview
Table of contents
Citations

About This Book

Create your own massively scalable Cassandra database with highly responsive database queries

About This Book

  • Create a Cassandra cluster and tweak its configuration to get the best performance based on your environment
  • Analyze the key concepts and architecture of Cassandra, which are essential to create highly responsive Cassandra databases
  • A fast-paced and step-by-step guide on handling huge amount of data and getting the best out of your database applications

Who This Book Is For

If you are a developer who is working with Cassandra and you want to deep dive into the core concepts and understand Cassandra's non-relational nature, then this book is for you. A basic understanding of Cassandra is expected.

What You Will Learn

  • Install and set up your Cassandra Cluster using various installation types
  • Use Cassandra Query Language (CQL) to design Cassandra database and tables with various configuration options
  • Design your Cassandra database to be evenly loaded with the lowest read/write latencies
  • Employ the available Cassandra tools to monitor and maintain a Cassandra cluster
  • Debug CQL queries to discover why they are performing relatively slowly
  • Choose the best-suited compaction strategy for your database based on your usage pattern
  • Tune Cassandra based on your deployment operation system environment

In Detail

Apache Cassandra Essentials takes you step-by-step from from the basics of installation to advanced installation options and database design techniques. It gives you all the information you need to effectively design a well distributed and high performance database. You'll get to know about the steps that are performed by a Cassandra node when you execute a read/write query, which is essential to properly maintain of a Cassandra cluster and to debug any issues. Next, you'll discover how to integrate a Cassandra driver in your applications and perform read/write operations. Finally, you'll learn about the various tools provided by Cassandra for serviceability aspects such as logging, metrics, backup, and recovery.

Style and approach

This step-by-step guide is packed with examples that explain the core concepts as well as advanced concepts, techniques, and usages of Apache Cassandra.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Apache Cassandra Essentials by Nitin Padalia in PDF and/or ePUB format, as well as other popular books in Informatica & Database. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781783989102
Edition
1
Subtopic
Database

Apache Cassandra Essentials


Table of Contents

Apache Cassandra Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Your Cassandra Cluster Ready
Installation
Prerequisites
Compiling Cassandra from source and installing
Installation from a precompiled binary
The installation layout
The directory layout in tarball installations
The directory layout in package-based installation
Configuration files
cassandra.yaml
Running a Cassandra server
Running a Cassandra node
Setting up the cluster
Viewing the cluster status
Summary
2. An Architectural Overview
Background
Cassandra cluster overview
The Gossip protocol
Failure detection
Data distribution
Replication
SimpleStrategy
NetworkTopologyStrategy
Snitches
Virtual nodes
Adding nodes to our cluster
Create keyspace and column family
Summary
3. Creating Database and Schema
A database and schema
Keyspace
Column families
Static rows
Wide rows
A primary key
Partition keys and clustering columns
A composite partition key
Multiple clustering columns
Static columns
Modifying a table
Data types
Counters
Collections
Sets
Lists
Map
UDTs
Secondary indexes
Allowing filtering
TTL
Conditional querying
Conditions on a partition key
Conditions on a partition key and clustering columns
Sorting query results
Write operations
Lightweight transactions
Batch statements
Summary
4. Read and Write – Behind the Scenes
Write operations
CommitLog
Anatomy of Memtable
SSTable explained
SSTable Compaction strategies
Size-tiered compaction
Leveled compaction
DateTiered compaction
Read operations
Reads from row cache
Read operations for row cache miss
Key is in KeyCache
Key search miss both the key cache and the row cache
Delete operations
Data consistency
Read operation
Digest reads
Read repair
Consistency levels
Write operation
Hinted handoff
Consistency levels
Tracing Cassandra queries
Summary
5. Writing Your Cassandra Client
Connecting to a Cassandra cluster
Driver Connection policies
Load balancing policies
Retry policies
Reconnection policies
Reading and writing to the Cassandra cluster
QueryBuilder
Reading and writing asynchronously
Prepared statements
Example REST service using prepared statement
Batch statements
Mapping API
Tracing Cassandra queries using Java driver
Summary
6. Monitoring and Tuning a Cassandra Cluster
Monitoring a Cassandra cluster
Use logging for debugging
Monitoring using command-line utilities
nodetool cfstats
nodetool cfhistograms
nodetool netstats
nodetool tpstats
JConsole
Third-party tools
Tuning Cassandra nodes
Configuring Cassandra caches
Tuning Bloom filters
Configuring and tuning Java
Summary
7. Backup and Restore
Taking backup of a Casandra cluster
Manual backup
Deleting snapshots
Incremental backup
Restoring data to Cassandra
The Cassandra bulk loader
Exporting and importing data using the Cassandra JSON utility
Loading external data into Cassandra
Removing nodes from Cassandra cluster
Adding nodes to a Cassandra cluster
Replacing dead nodes in a cluster
Summary
Index

Apache Cassandra Essentials

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: November 2015
Production reference: 1161115
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78398-910-2
www.packtpub.com

Credits

Author
Nitin Padalia
Reviewers
Ranjeet Kumar Jha
Sonal Raj
Chaoran Yu
Commissioning Editor
Akram Hussain
Acquisition Editor
Meeta Rajani
Content Development Editor
Aparna Mitra
Technical Editor
Rohan Uttam Gosavi
Copy Editor
Pranjali Chury
Project Coordinator
Mary Alex
Proofreader
Safis Editing
Indexer
Mariammal Chettiyar
Graphics
Disha Haria
Production Coordinator
Nilesh Mohite
Cover Work
Nilesh Mohite

About the Author

Nitin Padalia is the technical leader at Aricent Group, where he is involved in building highly scalable distributed applications in the field of telecommunications. From the beginning of his career, he has been working in the field of telecommunications and has worked on protocols such as SMPP, RTP, SIP, and VOIP. Since the beginning of his career, he has worked on the development of applications that can scale infinitely with highest performance possible. He has experience of developing applications for bare metal hardware, virtualized environments, and cloud-based applications using various languages and technologies.

Table of contents

  1. Apache Cassandra Essentials