
Learn the basics of Apache Cassandra, its architecture and replication concepts, and how to install, model data, and query with the Cassandra query language to manage keyspaces and tables.
Discover how Apache Cassandra, an open-source NoSQL distributed database, scales across many nodes and data centers to deliver high availability and fault tolerance using commodity hardware.
Explore how Cassandra enables massive scale and high availability for sensor data, recommendations, gaming, fraud detection, and the internet of things, with Netflix and Barracuda use cases.
Identify and meet the system requirements for the hands-on Cassandra exercises, including a 64-bit OS, 8 GB RAM, and 30+ GB free space, plus VMware setup for four virtual machines.
Download the working files, extract the zip to your desktop, then open or copy the organized files from the player or disk to work alongside the lessons.
Open the main virtual machine by unzipping virtual machine 1 zip and launching the .vmx file, log in with the password xubuntu on Ubuntu.
reinforces Cassandra concepts with a pop quiz, highlighting its open source nature and suitability for high-volume, real-time data like temperature data, online user behavior for recommendations, and package tracking.
Cassandra distributes data across multiple servers in a cluster, with no master-slave nodes and replication to avoid a single point of failure.
The lecture explains how snitch lets Cassandra nodes learn cluster topology across data centers and racks, and reviews simple, property file, and gossiping property files snitch types.
Explore how data distributes across a Cassandra cluster using consistent hashing and the Murmur3 partitioner to map rows to node token ranges and endpoints.
Explore replication in Cassandra, emphasizing replication factors, data replicas across nodes, and how three replicas safeguard data when a node goes down.
Explore virtual nodes in Cassandra, where each node manages many token ranges (default 256) to balance clusters and simplify adding new nodes, unlike the old static token range doubling method.
Explore Cassandra’s distributed architecture, including snitch, data distribution, replication, and virtual nodes, then answer a pop quiz on Murmur3 partitioner and flexible node addition in clusters.
Learn how to download Apache Cassandra from multiple sources, choose between tarball and community or enterprise options, and locate the downloaded file in your virtual machine.
Install and verify Oracle JDK 7 to run Cassandra, verify with java -version, noting Cassandra 2.0 requires JDK 7 and works best with Oracle JDK rather than OpenJDK.
Install Apache Cassandra from tarball or package manager, and follow production Linux steps for Red Hat, Debian, or Ubuntu environments.
Explore the Cassandra.yaml main configuration file, review cluster name, token ranges, partitioner murmur3, data file directories, and endpoint snitch, and prepare for multi-datacenter clustering.
Create the data and log directories at /var/lib/cassandra and /var/log/cassandra, then set permissions so cassandra can write to both.
Learn to start and stop Cassandra by running the bin/cassandra script, switch between background and foreground modes, locate the bin directory, and use a process ID to terminate the server.
Check a Cassandra node's status with nodetool status to verify it is up and normal, and view token ranges and node details with nodetool info.
Learn how to access the Cassandra system.log by navigating to /var/log/cassandra, view events with vim, and modify log destinations, levels, and max file size in the log4j-server.properties file.
Learn to install Cassandra by tarball or package, ensure Cassandra 2.0+ runs on JDK 7, identify the Cassandra.yaml config file, and verify a running Cassandra process.
Communicate with Cassandra using the Cassandra Query Language (CQL), a high-level alternative to Thrift, via cqlsh or drivers; note no joins in CQL due to distribution.
Learn to use cqlsh from the Cassandra bin directory, run describe cluster to get cluster details, explore help and keyspace commands, and exit when finished, while noting semicolon usage.
Explore how SQL and CQL differ as query languages across different database technologies, and prepare for building applications with a client driver through a brief true/false quiz.
Explore how Cassandra uses keyspaces to group tables within a cluster. Describe keyspaces to view system and system traces, and inspect tables inside each keyspace.
Define a keyspace in Cassandra using simple or network topology strategy, specify replication factor per data center, and verify creation with describe keyspace.
Learn how to delete a keyspace in Apache Cassandra with the drop keyspace command, recreate if needed, and verify deletion using describe keyspaces.
Explore how to create a Cassandra keyspace that spans multiple data centers, and understand network topology strategy, keyspace name case sensitivity with quotes, and per-data-center replication factors.
Create a keyspace named home security with simple replication factor 1, then verify its existence with describe keyspaces and describe keyspace.
Learn how to create a table in Cassandra with the create table command, use a keyspace, and name it activity in the home_security keyspace, while learning how to define columns.
Define a Cassandra table by specifying columns and data types, such as home_id text, date_time timestamp, event text, and code_use text, noting that some records may have missing values.
Define a compound primary key by combining the home id and date time columns to uniquely identify each row in a Cassandra table, comparing it with single-column primary keys.
Identify the partition key in a primary key by the value before the first comma. Learn how the partitioner hashes this key to determine the target node and partition.
Learn to specify a descending clustering order in Cassandra using with clustering order by to show the most recent events, and understand its impact on reads and writes.
Practice creating a table with the create table command, define columns and data types, and identify the primary key, partition key, and descending clustering order in a Cassandra pop quiz.
Create a second table named home in the home security keyspace to store home and owner contact info, with home_id as the primary and partition key and multiple text columns.
Explore methods to write data into Cassandra tables, including the insert into command for single rows, the copy command for import/export, and the ss table tool for bulk loading.
Use the insert into command to write a single row into the activity table by specifying column names and values, then use a select to view the inserted data.
Use the copy command to import data from a pipe-delimited csv into a Cassandra activity table, handling headers, file paths, and column mappings, with duplicates overwriting.
Learn how Cassandra stores data: a primary key defines uniqueness, a partition key groups rows into a single internal storage row, viewed through CQL and Cassandra Seelye.
Explore how Cassandra stores data on disk, from commit log backups to memcache flushes and sstables, and navigate the data directory, keyspaces, and tables.
Answer a quick quiz on inserting data in Cassandra, how sstables are stored on disk, including /var/lib/cassandra/data and using cqlsh.
Insert into the home table in the home security keyspace, import records with the copy command from a file, then flush memcache to disk to generate sstables.
Learn how Cassandra's distributed architecture makes joins impractical, and design tables to answer queries with denormalized data across partition keys and token-based distribution.
Explore how partition keys and clustering columns shape where clause queries in Cassandra, showing that queries must include the partition key and clustering columns for efficiency.
Understand that Cassandra secondary indexes let where clauses reference non primary columns but do not increase the speed of queries; consider a handmade table for queries like homes in state.
Create a secondary index in Apache Cassandra using the create index command, naming the index on the activity table's code_use column to enable querying by home ID and code.
Define a composite partition key combining vehicle_id and date to bound partitions. Create a location table with time, latitude, longitude, and a key using (vehicle_id, date) and time, time descending.
Explore Cassandra client drivers across languages like Java, C-Sharp, and Python to read from or write to Cassandra, with data-certified options and over 50 drivers available.
Learn how to use the DataStax Java driver to connect to a Cassandra cluster, download jars, view source code, and explore the Programmer's Guide and Java driver reference.
Set up your Java development environment using Eclipse, Oracle JDK, Maven, and Tomcat to build a vehicle tracker application, including creating a dynamic web project and configuring a Tomcat runtime.
Create a vehicle tracker web page using Java servlets in Eclipse, capturing date and vehicle id, querying Cassandra's vehicle tracker keyspace location table, and displaying location on Google Maps.
Learn to acquire the DataStax Java driver jar files using either the binary tarball or Maven, and ensure Cassandra nodes have start_native_transport set to true.
In Eclipse, convert your project to a Maven project, add the DataStax Cassandra driver under dependencies with group id, artifact id, and version to fetch jars from Maven repository.
Unpack the DataStax Java driver tarball from Chapter 9 and copy the files into the web live folder. Do this only if you did not obtain the jars through Mavin.
Create a cluster object in your Java app and add at least one ip contact point to connect to the Cassandra cluster; the driver discovers all nodes and their state.
Learn to connect a Java application to a Cassandra cluster, create a session from that connection, and execute a CQL select query to fetch vehicle location data into a resultset.
Display Cassandra query results on a web page by iterating rows and rendering a table of time, latitude, and longitude, with an option to show only the most recent entry.
Build a web interface to query Cassandra by vehicle ID and date, display results in a dynamic form, and optionally visualize location on a Google map.
Learn to structure Cassandra applications with the model-view-controller pattern, separating the data model, web view, and controller logic using a vehicle tracker example in Eclipse.
Develop a Cassandra-backed application by connecting to a cluster with the Java driver, executing queries, and displaying results within a model–view–controller pattern, while exploring multiple drivers and their documentation.
Create a second application to remotely check home alarm status, querying activity and home tables using a single cluster and session object in Cassandra.
Learn to build a second Cassandra client app with Maven, configure cluster and session, and query home and activity data by home id.
Create a second Cassandra app by building a new mvc pattern web project, exploring model, view, and controller files, and running the server to test home and activity data access.
Learn to update data in Apache Cassandra with the update command, using set and where clauses to modify phone or contact name for specific home_id records.
Explore how Cassandra handles updates as writes to a memo table that flushes to SS tables, then reads merge memcache and SS tables using the latest timestamp to resolve conflicts.
Explore how to delete data in Cassandra using delete, truncate, and drop commands, including removing column values, rows, tables, and keyspaces.
Understand tombstones in Cassandra, how deletions mark data, the GC grace seconds window (default 10 days), and how compaction and memtable flush clean tombstones.
Understand TTL, or time to live, which sets an expiration for inserted data, such as a 30-second TTL, with removal after the GC grace period via compaction.
Update the time to live for data using the update command with the using ttl clause to 90 days; observe tombstone status and gc grace period before compaction.
Explore updating and deleting data in Cassandra through quick questions on the update command, truncating tables, tombstones, gc grace seconds, and ttl, and how compaction affects on-disk deletion.
Update and delete data in Cassandra by modifying the home and activity tables in the home_security keyspace, including ttl-based inserts and extending ttl to six months.
This Apache Cassandra training course Infinite Skills teaches you the basics of working with Cassandra. This course is designed for the absolute beginner, meaning no experience with Cassandra is required. Experience with databases, SQL, and programming is recommended.
You will start by learning how to install Cassandra, and then move onto understanding ways to communicate with Cassandra. From there, this course will teach you how to create a database, create a table, and insert and model data. This video tutorial will also cover creating an application, updating and deleting data, selecting hardware, and adding nodes to a cluster. You will also learn how to monitor a cluster, repair and remove nodes, and redefine a cluster.
Once you have completed this video based training course, you will have a solid understanding of Cassandra, and be able to use Cassandra for your own development projects. Working files are included, allowing you to follow along with the author throughout the lessons.