Mastering Apache Cassandra - Second Edition
eBook - ePub

Mastering Apache Cassandra - Second Edition

Nishant Neeraj

Partager le livre
  1. 350 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Mastering Apache Cassandra - Second Edition

Nishant Neeraj

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Mastering Apache Cassandra - Second Edition est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Mastering Apache Cassandra - Second Edition par Nishant Neeraj en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Informatik et Datenmodellierung- & design. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2015
ISBN
9781784392611

Mastering Apache Cassandra Second Edition


Table of Contents

Mastering Apache Cassandra Second Edition
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. Quick Start
Introduction to Cassandra
A distributed database
High availability
Replication
Multiple data centers
A brief introduction to a data model
Installing Cassandra locally
Cassandra in action
Modeling data
Writing code
Setting up
Inserting records
Retrieving data
Writing your application
Getting the connection
Executing queries
Object mapping
Summary
2. Cassandra Architecture
Problems in the RDBMS world
Enter NoSQL
The CAP theorem
Consistency
Availability
Partition-tolerance
The significance of the CAP theorem
Cassandra
Understanding the architecture of Cassandra
Ring representation
Virtual nodes
How Cassandra works
Write in action
Read in action
The components of Cassandra
The messaging service
Gossip
Failure detection
Gossip and failure detection
Partitioner
Replication
The notorious R + W > N inequality
LSM tree
Commit log
MemTable
SSTable
The bloom filter
Index files
Data files
Compaction
Tombstones
Hinted handoff
Read repair and anti-entropy
Merkle tree
Summary
3. Effective CQL
The Cassandra data model
The counter column (cell)
The expiring cell
The column family
Keyspaces
Data types
The primary index
CQL3
Creating a keyspace
SimpleStrategy
NetworkTopologyStrategy
Altering a keyspace
Creating a table
Table properties
Altering a table
Adding a column
Renaming a column
Changing the data type
Dropping a column
Updating the table properties
Dropping a table
Creating an index
Dropping an index
Creating a data type
Altering a custom type
Dropping a custom type
Creating triggers
Dropping a trigger
Creating a user
Altering a user
Dropping a user
The granting permission
Revoking permission using REVOKE
Inserting data
Collections in CQL
Lists
Sets
Maps
Lightweight transactions
Updating a row
Deleting a row
Executing the BATCH statement
Other CQL commands
USE
TRUNCATE
LIST USERS
LIST PERMISSIONS
CQL shell commands
DESCRIBE
TRACING
CONSISTENCY
COPY
CAPTURE
ASSUME
SOURCE
SHOW
EXIT
Summary
4. Deploying a Cluster
Evaluating requirements
Hard disk capacity
RAM
CPU
Is node a server?
Network
System configurations
Optimizing user limits
Swapping memory
Clock synchronization
Disk readahead
The required software
Installing Oracle Java 7
RHEL and CentOS systems
Debian and Ubuntu systems
Installing the Java Native Access library
Installing Cassandra
Installing from a tarball
Installing from ASFRepository for Debian or Ubuntu
Anatomy of the installation
Cassandra binaries
Configuration files
Setting up data and commitlog directories
Configuring a Cassandra cluster
The cluster name
The seed node
Listen, broadcast, and RPC addresses
num_tokens versus initial_token
num_tokens
initial_token
Partitioners
The Random partitioner
The Byte-ordered partitioner
The Mumur3 partitioner
Snitches
SimpleSnitch
PropertyFileSnitch
GossipingPropertyFileSnitch
RackInferringSnitch
EC2Snitch
EC2MultiRegionSnitch
Replica placement strategies
SimpleStrategy
NetworkTopologyStrategy
Multiple data center setups
Launching a cluster with a script
Creating a keyspace
Authorization and authentication
Summary
5. Performance Tuning
Stress testing
Database schema
Data distribution
Write pattern
Read queries
Performance tuning
Write performance
Read performance
Choosing the right compaction strategy
Size-tiered compaction strategy
Leveled compaction
Row cache
Key cache
Cache settings
Enabling compression
Tuning the bloom filter
More tuning via cassandra.yaml
commitlog_sync
column_index_size_in_kb
commitlog_total_space_in_mb
Tweaking JVM
Java heap
Garbage collection
Other JVM options
Scaling horizontally and vertically
Network
Summary
6. Managing a Cluster – Scaling, Node Repair, and Backup
Scaling
Adding nodes to a cluster
Adding new nodes in vnode-enabled clusters
Adding a new node to a cluster without vnodes
Removing nodes from a cluster
Removing a live node
Removing a dead node
Replacing a node
Backup and restoration
Using the Cassandra bulk loader to restore the data
Load balancing
DataStax OpsCenter – managing large clusters
Summary
7. Monitoring
Cassandra's JMX interface
Accessing MBeans using JConsole
Cassandra's nodetool utility
Monitoring with nodetool
cfstats
netstats
status
ring and describering
tpstats
compactionstats
info
Managing administration with nodetool
drain
decommission
removenode
move
repair
upgradesstable
snapshot
DataStax OpsCenter
The OpsCenter features
Installing OpsCenter and an agent
Prerequisites
Running a Cassandra cluster
Installing OpsCenter from tarball
Setting up an OpsCenter agent
Monitoring and administrating with OpsCenter
Other features of OpsCenter
Nagios – monitoring and notification
Installing Nagios
Prerequisites
Preparation
Installation
Installing Nagios
Configuring Apache httpd
Installing Nagios plugins
Setting up Nagios as a service
Nagios plugins
Nagios plugins for Cassandra
Executing remote plugins via the NRPE plugin
Installing NRPE on host machines
Installing the NRPE plugin on a Nagios machine
Setting up things to monitor
Monitoring and notification using Nagios
Cassandra log
Enabling Java options for GC logging
Troubleshooting
High CPU usage
High memory usage
Hotspots
Open JDK's erratic behavior
Disk performance
Slow snapshots
Getting help from the mailing list
Summary
8. Integration with Hadoop
Using Hadoop
Hadoop and Cassandra
Introduction to Hadoop
HDFS
Data management
NameNode
DataNodes
Hadoop MapReduce
JobTracker
TaskTracker
Reliability of data and processes in Hadoop
Setting up local Hadoop
Testing the installation
Cassandra with Hadoop MapReduce
Preparing Cassandra for Hadoop
ColumnFamilyInputFormat
ColumnFamilyOutputFormat
CqlOutputFormat and CqlInputFormat
ConfigHelper
Wide row support
Bulk loading
Secondary index support
Cassandra and Hadoop in action
Executing, debugging, monitoring, and looking at results
Hadoop in a Cassandra cluster
Cassandra filesystem
Integration with Pig
Installing Pig
Integrating Pig and Cassandra
Integration with other analytical tools
Summary
Index

Mastering Apache Cassandra S...

Table des matiĂšres