Big Data

Introduction to Cassandra 2, CQL 3, and the Datastax Java Driver

מספר הקורס 6959

24 סה"כ שעות אקדמאיות
3 מפגשים
* מספר המפגשים והשעות למפגש עשויים להשתנות בין קורס לקורס

המועדים הקרובים

קורס לקבוצות

הקורס נפתח במתכונת של קבוצה בלבד, בהתאמה אישית לארגונים.
לפרטים נוספים:

ספרו לי עוד


The Cassandra (C*) NoSQL database is one of the most powerful and widely used non-relational databases available today. It is a fault tolerant, highly scalable database with tunable consistency that meets the demanding requirements of the "can't fail, must scale" systems driving growth for many of the most successful enterprises of today. However, along with that capability comes a new data and programming model that many organizations lack the expertise to use in an optimal fashion.

This course provides a technical introduction to all the conceptual and practical areas needed to use Cassandra successfully. It is written expressly for the new capabilities in the C* 2.0, including CQL3.1 and the new DataStax Java driver V2. The course provides a solid foundation in the architecture and data model of C* and how to work with it. It covers CQL3 in detail, as well as important data modeling techniques to optimize your usage of the database. It includes in-depth coverage of the new Java driver for C*, as well as a full-scale application based on a stock-trading system (StockWatcher) that uses the driver.

After taking this course, you will be ready to work with Cassandra in an informed and productive manner, including using CQL3 and the new Java driver. You will be aware of some common pitfalls as well as best practices for creating your data model and applications. You will gain a clear understanding of how C* works, and be fully prepared to use it in production systems.



On Completion, Delegates will be able to

Understand what is Big Data

Big Data challenge

Understand the motivation for non-relational data stores

Be familiar with Cassandra at a high-level

Be familiar with basic installation / setup of Cassandra, and how an installation is structured

Understand the Cassandra architecture, including the cluster structure and partitioners

Understand and use data replication and eventual consistency with Cassandra

Learn the basics of the Cassandra data model, and how to create good data models

Use CQL 3 to create tables and execute queries

Learn and use cqlsh

Know the standard CQL data types

Understand and use primary keys, compound primary keys, and composite partition keys

Understand and use collections, secondary indexes, counters, and batches

Understand and use Compare and Set (CAS) / Lightweight Transactions

Be comfortable with and use other Cassandra 2 features such as static columns

Understand the structure of the Java driver

Use the basic Java API to connect to and work with Cassandra

Use QueryBuilder to build dynamic queries

Use asynchronous queries


למי מיועד הקורס


תכנית הלימודים

PDF להורדה

Session 1: Introduction to Cassandra

  • Overview
    • Big Data characteristics
    • Big Data challenge
    • The motivation for non-relational data stores
    • Why relational databases don't support modern applications well
    • Cassandra at a high-level
    • Use cases
    • Features Strengths (Scalability, robustness, linear performance with scale-out), etc.
    • High Level Structure
  • Acquiring and Installing Cassandra
  • Configuring and Installation Structure

Session 2: Overview of Architecture and Data Model

  • Basic Cassandra Architecture
    • Cluster Structure – Nodes, Virtual Nodes, Ring Topology
    • Consistent Hashing, Tokens, Partitioners, and Data Distribution
    • Data Replication, the Replication Factor, Keyspaces
    • Consistency, the CAP theorem, Eventual Consistency
  • The C* Data Model
    • Data Model and CQL 3 Introduction
    • Using CQL and cqlsh
    • Single primary key tables and how to define them using CQL
    • Inserting Data (INSERT), Data Distribution in the Ring, Upsert
    • Querying for Data (SELECT)
    • CQL Data Types
    • Working with Primary Keys

Session 3: The Cassandra Data Model

  • Compound Primary Keys
    • CQL table definition
    • The partition key and clustering columns
    • CQL Mapping vs. Internal Storage View
  • Other Capabilities
    • Expiring Columns / Time To Live (TTL)
    • Batches
    • Clustering order, ORDER BY, and CLUSTERING ORDER BY
    • Filtering results and ALLOW FILTERING


  • Composite Partition Keys
    • Motivation and uses
    • CQL Definition
    • Effect on Partitioning and Internal Storage View
  • Indexes and Secondary Indexes
    • Partition Key Indexes, token()
    • Non-primary Key (Secondary) Indexes
    • Guidelines and Querying
  • Understand and Use Counters
    • Motivation and Uses
    • Structure, Characteristics, CQL, Usage
    • Limitations
  • Understand and use collections
    • Motivation and uses
    • CQL definition (set, list, and map)
    • Inserting, Updating, Deleting with a Collection
    • Limitations and Internal Storage View

Session 4: Data Consistency

  • Data Consistency in Cassandra
    • Tunable Consistency
    • CAP Theorem
    • Coordinators and Client Requests
    • Consistency Levels in C* – ONE, QUORUM, ALL
    • Configuring Immediate Consistency
    • CL ONE is Your Friend
    • Other CL Levels
  • Compare and Set (CAS) / Lightweight Transactions
    • Motivation and Need
    • Overview of CAS
    • Using CAS – IF NOT EXISTS, IF condition
    • Paxos – How CAS works
    • Overhead and caveats
  • Static Columns
    • Overview
    • Declaring Tables and Using Static Columns
    • Guidelines and Uses
  • Repair Mechanisms
    • Read Repair
    • Hinted Handoff


Session 5: How Things Work

  • Write Failures
    • Unavailability, Node Failure
    • Requirements for Writing
  • Key and Row Caches
    • Cache Overview
    • Guidelines
  • Multi-Data Center Support
    • Overview
    • Replication Factor Configuration
    • Consistency Levels – LOCAL/EACH QUORUM
  • Deletes
    • CQL
    • Tombstones
    • Issues and Guidelines

Session 6: The Java Driver

  • Introduction
    • Overview and Architecture
    • Features
  • API Introduction
    • Cluster and Cluster. Builder
    • Creating the Cluster
    • Contact Points
    • Getting a Session
    • Working with Sessions
  • Querying
    • Prepared Statement, Statement, Bound Statement
    • Using Prepared Statements, Binding Values
    • Executing the Query
    • Processing Query Results
    • CQL to Java Type Mapping
    • Working with UUIDs
    • Setting Consistency Level
  • Query Builder and Dynamic Queries
    • Dynamic Queries
    • Bind Variables and Simple Statement
    • Query Builder – Fluent API for Queries
    • Building SELECT, Select Type, Select. where(), Chaining WHERE Clauses
    • Building DELETE, Delete Type, Delete. where()
    • Building INSERT, Insert Type, Insert. insert Into(), Insert. value()
    • Building Update, Update Type, Insert. with(), Insert. value()
    • Building Regular Batches and Prepared Statement Batches (BatchStatemnt)
    • Other Queries


  • Asynchronous Querying
    • Normal vs Asynchronous Querying
    • Interface java. util. concurrent. Future
    • Result Set Future
    • Querying Asynchronously and Processing Future Results
    • Listeners for Processing

  • Driver Policies
    • Overview
    • Load Balancing Policies – Round Robin Policy, DCA ware Round Robin Policy
    • Retry Policies – Default Retry Policy, DowngradingConsistencyRetryPolicy, LatencyAwarePolicy
    • The Policies Class


Reasonable Java experience for the Java driver labs, some knowledge of databases

Schedule Appointment

Fill out the form below, and we will be in touch shortly.

לא הצלחנו לאתר את הטופס.