ebook img

Apache Cassandra 3.0 for DSE 5.0 PDF

396 Pages·2017·4.44 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Apache Cassandra 3.0 for DSE 5.0

Apache Cassandra 3.0 for DSE 5.0 (Earlier version) Updated: 2019-03-23-07:00 © 2018 DataStax, Inc. All rights reserved. DataStax, Titan, and TitanDB are registered trademark of DataStax, Inc. and its subsidiaries in the United States and/or other countries. Apache Cassandra, Apache, Tomcat, Lucene, Solr, Hadoop, Spark, TinkerPop, and Cassandra are trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Apache Cassandra 3.0 for DSE 5.0 (Earlier version) Table of Contents About Apache Cassandra.......................................................................................................13 What's new?....................................................................................................................15 Understanding the architecture..............................................................................................18 Architecture in brief.........................................................................................................18 Internode communications (gossip)................................................................................ 21 Failure detection and recovery.................................................................................21 Data distribution and replication......................................................................................22 Consistent hashing...................................................................................................22 Virtual nodes............................................................................................................23 Data replication........................................................................................................25 Partitioners.......................................................................................................................26 Murmur3Partitioner...................................................................................................27 RandomPartitioner....................................................................................................27 ByteOrderedPartitioner.............................................................................................28 Snitches...........................................................................................................................28 Dynamic snitching....................................................................................................29 SimpleSnitch.............................................................................................................29 RackInferringSnitch..................................................................................................29 PropertyFileSnitch....................................................................................................30 GossipingPropertyFileSnitch....................................................................................31 Ec2Snitch..................................................................................................................32 Ec2MultiRegionSnitch...............................................................................................33 GoogleCloudSnitch...................................................................................................36 CloudstackSnitch......................................................................................................37 Database internals..................................................................................................................38 Storage engine................................................................................................................38 How Cassandra reads and writes data...........................................................................38 Apache Cassandra 3.0 for DSE 5.0 (Earlier version) How is data written?................................................................................................38 How is data maintained?.........................................................................................40 How is data updated?..............................................................................................49 How is data deleted?...............................................................................................49 How are indexes stored and updated?....................................................................51 How is data read?....................................................................................................52 How do write patterns affect reads?........................................................................55 Data consistency.............................................................................................................56 How are consistent read and write operations handled?.........................................56 How are Cassandra transactions different from RDBMS transactions?...................58 How do I accomplish lightweight transactions with linearizable consistency?..........59 How do I discover consistency level performance?.................................................61 How is the consistency level configured?................................................................61 How is the serial consistency level configured?......................................................65 How are read requests accomplished?...................................................................65 How are write requests accomplished?...................................................................76 Planning a cluster deployment...............................................................................................79 Installing..................................................................................................................................80 Using the Yum repository................................................................................................80 Using the APT repository................................................................................................80 Installing from the binary tarball......................................................................................80 Installing earlier releases.................................................................................................80 Uninstalling Cassandra....................................................................................................80 Installing on cloud providers........................................................................................... 80 Installing the JDK............................................................................................................81 Installing Oracle JDK on RHEL-based Systems......................................................81 Installing Oracle JDK on Debian-based systems.....................................................82 Installing OpenJDK on RHEL-based systems.........................................................83 Apache Cassandra 3.0 for DSE 5.0 (Earlier version) Installing OpenJDK on Debian-based systems........................................................84 Recommended production settings.................................................................................85 Install locations................................................................................................................85 Tarball installation directories...................................................................................85 Package installation directories................................................................................85 Configuration...........................................................................................................................86 cassandra.yaml................................................................................................................86 Cassandra include file...................................................................................................117 Security..........................................................................................................................117 Securing Cassandra...............................................................................................117 Internal authentication............................................................................................118 Internal authorization..............................................................................................124 JMX authentication and authorization....................................................................126 SSL encryption.......................................................................................................131 Configuring firewall port access.............................................................................152 Configuring gossip settings...........................................................................................153 Configuring the heap dump directory............................................................................153 Configuring virtual nodes...............................................................................................155 Enabling virtual nodes on a new cluster................................................................155 Enabling virtual nodes on an existing production cluster.......................................155 Using multiple network interfaces.................................................................................156 Configuring logging........................................................................................................160 Commit log archive configuration..................................................................................163 Generating tokens.........................................................................................................164 Hadoop support.............................................................................................................165 Initializing a cluster...............................................................................................................168 Initializing a multiple node cluster (single datacenter)..................................................168 Initializing a multiple node cluster (multiple datacenters)..............................................172 Starting and stopping Cassandra..................................................................................176 Apache Cassandra 3.0 for DSE 5.0 (Earlier version) Starting Cassandra as a service............................................................................176 Starting Cassandra as a stand-alone process.......................................................176 Stopping Cassandra as a service..........................................................................176 Stopping Cassandra as a stand-alone process.....................................................177 Clearing the data as a service...............................................................................177 Clearing the data as a stand-alone process..........................................................177 Operations.............................................................................................................................178 Adding or removing nodes, datacenters, or clusters.....................................................178 Adding nodes to an existing cluster.......................................................................178 Adding a datacenter to a cluster............................................................................180 Replacing a dead node or dead seed node..........................................................185 Replacing a running node......................................................................................189 Moving a node from one rack to another..............................................................190 Decommissioning a datacenter..............................................................................191 Removing a node...................................................................................................191 Switching snitches..................................................................................................192 Changing keyspace replication strategy................................................................195 Edge cases for transitioning or migrating a cluster................................................196 Adding single-token nodes to a cluster..................................................................197 Adding a datacenter to a single-token architecture cluster....................................199 Replacing a dead node in a single-architecture cluster.........................................201 Backing up and restoring data......................................................................................202 About snapshots.....................................................................................................202 Taking a snapshot..................................................................................................203 Deleting snapshot files...........................................................................................204 Enabling incremental backups...............................................................................204 Restoring from a snapshot.....................................................................................205 Restoring a snapshot into a new cluster...............................................................207 Apache Cassandra 3.0 for DSE 5.0 (Earlier version) Recovering from a single disk failure using JBOD................................................208 Repairing nodes............................................................................................................212 Hinted Handoff: repair during write path................................................................213 Read Repair: repair during read path....................................................................215 Manual repair: Anti-entropy repair.........................................................................215 Changing repair strategies.....................................................................................221 Monitoring Cassandra................................................................................................... 224 Getting statistics and metrics.................................................................................224 Table statistics........................................................................................................230 Thread pool and read/write latency statistics.........................................................230 Compaction metrics................................................................................................232 Tuning Java resources..................................................................................................232 Data caching..................................................................................................................237 Configuring data caches........................................................................................237 Monitoring and adjusting caching..........................................................................240 Configuring memtable thresholds..................................................................................241 Configuring compaction.................................................................................................241 Compression..................................................................................................................243 When to compress data.........................................................................................244 Configuring compression........................................................................................244 Testing compaction and compression...........................................................................245 Tuning Bloom filters.......................................................................................................246 Moving data to or from other databases.......................................................................247 Purging gossip state on a node....................................................................................247 Cassandra tools....................................................................................................................250 The nodetool utility........................................................................................................250 About the nodetool utility.......................................................................................250 abortrebuild.............................................................................................................251 Apache Cassandra 3.0 for DSE 5.0 (Earlier version) assassinate.............................................................................................................252 bootstrap.................................................................................................................254 cfhistograms...........................................................................................................255 cfstats.....................................................................................................................255 cleanup...................................................................................................................255 clearsnapshot.........................................................................................................256 compact..................................................................................................................257 compactionhistory...................................................................................................259 compactionstats......................................................................................................262 decommission.........................................................................................................263 describecluster........................................................................................................264 describering............................................................................................................265 disableautocompaction...........................................................................................267 disablebackup.........................................................................................................267 disablebinary...........................................................................................................268 disablegossip..........................................................................................................269 disablehandoff........................................................................................................269 disablehintsfordc.....................................................................................................270 disablethrift.............................................................................................................271 drain........................................................................................................................272 enableautocompaction............................................................................................273 enablebackup.........................................................................................................274 enablebinary...........................................................................................................274 enablegossip...........................................................................................................275 enablehandoff.........................................................................................................276 enablehintsfordc.....................................................................................................276 enablethrift..............................................................................................................278 failuredetector.........................................................................................................278 Apache Cassandra 3.0 for DSE 5.0 (Earlier version) flush........................................................................................................................279 gcstats....................................................................................................................280 getcompactionthreshold..........................................................................................281 getcompactionthroughput.......................................................................................282 getendpoints...........................................................................................................283 getinterdcstreamthroughput....................................................................................284 getlogginglevels......................................................................................................285 getseeds.................................................................................................................285 getsstables..............................................................................................................286 getstreamthroughput...............................................................................................287 gettimeout...............................................................................................................288 gettraceprobability..................................................................................................289 gossipinfo................................................................................................................290 help.........................................................................................................................290 info..........................................................................................................................291 invalidatecountercache...........................................................................................292 invalidatekeycache.................................................................................................293 invalidaterowcache.................................................................................................294 join..........................................................................................................................295 listendpointspendinghints.......................................................................................295 listsnapshots...........................................................................................................297 mark_unrepaired.....................................................................................................298 move.......................................................................................................................299 netstats...................................................................................................................300 pausehandoff..........................................................................................................301 proxyhistograms.....................................................................................................302 rangekeysample.....................................................................................................303 rebuild.....................................................................................................................304 Apache Cassandra 3.0 for DSE 5.0 (Earlier version) rebuild_index..........................................................................................................306 refresh.....................................................................................................................307 refreshsizeestimates...............................................................................................307 reloadseeds............................................................................................................308 reloadtriggers..........................................................................................................308 removenode............................................................................................................309 repair.......................................................................................................................311 replaybatchlog........................................................................................................316 resetlocalschema....................................................................................................316 resumehandoff........................................................................................................318 ring..........................................................................................................................318 scrub.......................................................................................................................320 setcachecapacity....................................................................................................322 setcachekeystosave...............................................................................................323 setcompactionthreshold..........................................................................................324 setcompactionthroughput.......................................................................................326 sethintedhandoffthrottlekb......................................................................................326 setinterdcstreamthroughput....................................................................................327 setlogginglevel........................................................................................................328 setstreamthroughput...............................................................................................329 settimeout...............................................................................................................330 settraceprobability...................................................................................................332 sjk...........................................................................................................................333 snapshot.................................................................................................................338 status......................................................................................................................341 statusbackup...........................................................................................................343 statusbinary............................................................................................................344 statusgossip............................................................................................................345

Description:
Apache Cassandra, Apache, Tomcat, Lucene, Solr, Hadoop, Spark, programmatically or using a client application, such as CQL. A method for locally determining from gossip state and history if another node in the system Note: Cassandra bypasses compaction operations when bootstrapping.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.