Mirror of Apache Cassandra

Overview

Apache Cassandra

Apache Cassandra is a highly-scalable partitioned row store. Rows are organized into tables with a required primary key.

Partitioning means that Cassandra can distribute your data across multiple machines in an application-transparent matter. Cassandra will automatically repartition as machines are added and removed from the cluster.

Row store means that like relational databases, Cassandra organizes data by rows and columns. The Cassandra Query Language (CQL) is a close relative of SQL.

For more information, see the Apache Cassandra web site.

Requirements

  1. Java >= 1.8 (OpenJDK and Oracle JVMS have been tested)

  2. Python 3.6+ (for cqlsh; 2.7 works but is deprecated)

Getting started

This short guide will walk you through getting a basic one node cluster up and running, and demonstrate some simple reads and writes. For a more-complete guide, please see the Apache Cassandra website’s Getting Started Guide.

First, we’ll unpack our archive:

$ tar -zxvf apache-cassandra-$VERSION.tar.gz
$ cd apache-cassandra-$VERSION

After that we start the server. Running the startup script with the -f argument will cause Cassandra to remain in the foreground and log to standard out; it can be stopped with ctrl-C.

$ bin/cassandra -f

Now let’s try to read and write some data using the Cassandra Query Language:

$ bin/cqlsh

The command line client is interactive so if everything worked you should be sitting in front of a prompt:

Connected to Test Cluster at localhost:9160.
[cqlsh 2.2.0 | Cassandra 1.2.0 | CQL spec 3.0.0 | Thrift protocol 19.35.0]
Use HELP for help.
cqlsh>

As the banner says, you can use 'help;' or '?' to see what CQL has to offer, and 'quit;' or 'exit;' when you’ve had enough fun. But lets try something slightly more interesting:

cqlsh> CREATE KEYSPACE schema1
       WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
cqlsh> USE schema1;
cqlsh:Schema1> CREATE TABLE users (
                 user_id varchar PRIMARY KEY,
                 first varchar,
                 last varchar,
                 age int
               );
cqlsh:Schema1> INSERT INTO users (user_id, first, last, age)
               VALUES ('jsmith', 'John', 'Smith', 42);
cqlsh:Schema1> SELECT * FROM users;
 user_id | age | first | last
---------+-----+-------+-------
  jsmith |  42 |  john | smith
cqlsh:Schema1>

If your session looks similar to what’s above, congrats, your single node cluster is operational!

For more on what commands are supported by CQL, see the CQL reference. A reasonable way to think of it is as, "SQL minus joins and subqueries, plus collections."

Wondering where to go from here?

  • Join us in #cassandra on the ASF Slack and ask questions

  • Subscribe to the Users mailing list by sending a mail to [email protected]

  • Visit the community section of the Cassandra website for more information on getting involved.

  • Visit the development section of the Cassandra website for more information on how to contribute.

Comments
  • CASSANDRA-17837 Add pull request template and update readme

    CASSANDRA-17837 Add pull request template and update readme

    Pull request Description: Adds pull request template that looks like this form. This should be applied to all released and official development branches.

    Issue resolved: CASSANDRA-17837

    or

    • [ ] this is a trivial documentation change. (e.g. fixes a typo)

    • [ ] Commits have been squashed to remove intermediate development commit messages.
    • [ ] Key commit messages start with the issue number (CASSANDRA-xxxx)

    if not a trivial change:

    • [ ] Jira ticket contains a description of: what is fixed, why it is needed, and what branches to apply it to.
    • [ ] Tests are included.
    • [ ] Documentation changes and/or updates are included.
    • [ ] By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.

    References:

    opened by Claudenw 45
  • CASSANDRA-17750: Remove Maven Ant Tasks

    CASSANDRA-17750: Remove Maven Ant Tasks

    Jira: https://issues.apache.org/jira/browse/CASSANDRA-17750 CircleCI: https://app.circleci.com/pipelines/github/aratno/cassandra?branch=CASSANDRA-17750-remote-maven-ant-tasks

    opened by aratno 45
  • CASSANDRA-17753: Include GitSHA in nodetool version output

    CASSANDRA-17753: Include GitSHA in nodetool version output

    Jira: https://issues.apache.org/jira/browse/CASSANDRA-17753 CircleCI: https://app.circleci.com/pipelines/github/aratno/cassandra?branch=CASSANDRA-17753-nodetool-version-gitsha

    # When Cassandra is built with a clean Git index
    $ ./bin/nodetool version
    ReleaseVersion: 4.1-alpha2-SNAPSHOT
    GitSHA: 5fce07e2f1e2e0b9cf7d82adfd8c0b21993f8672
    
    # When Cassandra is built with a dirty Git index
    $ ./bin/nodetool version
    ReleaseVersion: 4.1-alpha2-SNAPSHOT
    GitSHA: 5fce07e2f1e2e0b9cf7d82adfd8c0b21993f8672-dirty
    
    opened by aratno 10
  • Enable dtest-offheap in CircleCI

    Enable dtest-offheap in CircleCI

    The dtest-offheap test was only added to the Jenkins configuration, so this commit adds it to the CircleCI build for parity. Because dtest-offheap in Jenkins is configured to skip resource intensive tests, the dtest-offheap suite is added to all three sets (LOW, MEDIUM, HIGH).

    Patch by Derek Chen-Becker; reviewed by Ekaterina Dimitrova for CASSANDRA-17950

    opened by dchenbecker 8
  • CASSANDRA-14790 Fix flaky LongBufferPoolTest

    CASSANDRA-14790 Fix flaky LongBufferPoolTest

    The LongBufferPoolTest previously required significantly more heap memory on machines with higher core count.

    This PR

    • adds commands to the build system to allow running individual burn tests (in and outside junit)
    • fixes some race conditions that occur when the test is running under heavy memory pressure
    • changes the calculation for how much memory the ring-of-threads should allocate to be roughly double the pool size under test. It now completes with much less memory and should run fine on a builder.
    opened by jonmeredith 8
  • CASSANDRA-17444 Update document properties heading.

    CASSANDRA-17444 Update document properties heading.

    Update document properties heading. The headline was different from the rest of the page in the formato, so it has been corrected.

    This page. 2022-02-24 19 13 29 https://cassandra.apache.org/doc/latest/cassandra/configuration/cass_topo_file.html https://cassandra.apache.org/doc/latest/cassandra/configuration/cass_cl_archive_file.html

    Other page. https://cassandra.apache.org/doc/latest/cassandra/configuration/cass_yaml_file.html

    docs 
    opened by taku333 6
  • Cassandra 18134

    Cassandra 18134

    patch by ; reviewed by for CASSANDRA-18134

    Co-authored-by: Branimir Lambov Co-authored-by: Sylvain Lebresne Co-authored-by: Jacek Lewandowski Co-authored-by: Jakub Zytka

    The Cassandra Jira

    opened by jacek-lewandowski 0
  • Fix typo "the"">

    Fix typo "the-the" -> "the"

    I searched the entire repository for the *.md files and didn't spot any more of such typos. Here is the command:

    find . -not -path "./.git/*" -type f -name "*.md" -exec grep --color "\(\b\w\+\)\b\s*\1\b" {} \+
    
    docs 
    opened by neshkeev 0
  • [CASSANDRA-16418]: Unsafe to run nodetool cleanup during bootstrap or decommission

    [CASSANDRA-16418]: Unsafe to run nodetool cleanup during bootstrap or decommission

    Changes:

    • Added check during cleanup to ensure the node has no pending ranges before proceeding
    • Bug from JIRA ticket did not exist for bootstrap due to existing safety check but the check was one level below other safeguard checks so moved it to same location

    To reproduce, run cleanup on a node receiving data while another node is being decommissioned. I created 20 sstables of data.

    patch by Lindsey Zurovchak; reviewed by Paulo Motta for CASSANDRA-16418

    opened by linzuro 0
  • [CASSANDRA-11537] Friendly error message when nodetool is used on uninitialized Cassandra node

    [CASSANDRA-11537] Friendly error message when nodetool is used on uninitialized Cassandra node

    CASSANDRA-11537

    To reproduce this, you can run a loop on a nodetool command while a Cassandra node is initializing. I used ring.

    patch by William Nguyen; reviewed by Paulo Motta for CASSANDRA-11537

    opened by williamvietnguyen 0
Owner
The Apache Software Foundation
The Apache Software Foundation
Apache Druid: a high performance real-time analytics database.

Website | Documentation | Developer Mailing List | User Mailing List | Slack | Twitter | Download Apache Druid Druid is a high performance real-time a

The Apache Software Foundation 12.3k Jan 2, 2023
Apache HBase

Apache HBase [1] is an open-source, distributed, versioned, column-oriented store modeled after Google' Bigtable: A Distributed Storage System for Str

The Apache Software Foundation 4.7k Jan 7, 2023
NoSQL data store using the seastar framework, compatible with Apache Cassandra

Scylla What is Scylla? Scylla is the real-time big data database that is API-compatible with Apache Cassandra and Amazon DynamoDB. Scylla embraces a s

ScyllaDB 8.9k Dec 27, 2022
Time Series Metrics Engine based on Cassandra

Hawkular Metrics, a storage engine for metric data About Hawkular Metrics is the metric data storage engine part of Hawkular community. It relies on A

Hawkular 230 Dec 9, 2022
Spring MSA api gateway & service discovery with consul & Jaeger & Cassandra

Spring-Cloud-MSA 준비 Cassandra 서버를 준비한다 table.sql 파일로 keyspace와 테이블을 만들어 둔다 Consul 1.11.1버전 기준 https://www.consul.io/downloads 에서 1.11.1 버전 운영체제 맞게 다운

INSUNG CHOI 2 Nov 22, 2022
Mirror of Apache Deltaspike

Apache DeltaSpike Documentation Mailing Lists Contribution Guide JIRA Apache License v2.0 Apache DeltaSpike is a suite of portable CDI Extensions inte

The Apache Software Foundation 141 Jan 1, 2023
Mirror of Apache Mahout

Welcome to Apache Mahout! The goal of the Apache Mahout™ project is to build an environment for quickly creating scalable, performant machine learning

The Apache Software Foundation 2k Jan 4, 2023
Mirror of Apache Kafka

Apache Kafka See our web site for details on the project. You need to have Java installed. We build and test Apache Kafka with Java 8, 11 and 15. We s

The Apache Software Foundation 23.9k Jan 5, 2023
Mirror of Apache RocketMQ

Apache RocketMQ Apache RocketMQ is a distributed messaging and streaming platform with low latency, high performance and reliability, trillion-level c

The Apache Software Foundation 18.5k Dec 28, 2022
Mirror of Apache ActiveMQ

Welcome to Apache ActiveMQ Apache ActiveMQ is a high performance Apache 2.0 licensed Message Broker and JMS 1.1 implementation. Getting Started To hel

The Apache Software Foundation 2.1k Jan 2, 2023
Mirror of Apache ActiveMQ Artemis

ActiveMQ Artemis This file describes some minimum 'stuff one needs to know' to get started coding in this project. Source For details about the modify

The Apache Software Foundation 824 Dec 26, 2022
Mirror of Apache Storm

Master Branch: Storm is a distributed realtime computation system. Similar to how Hadoop provides a set of general primitives for doing batch processi

The Apache Software Foundation 6.4k Dec 26, 2022
Mirror of Apache SIS

============================================= Welcome to Apache SIS <http://sis.apache.org> ============================================= SIS is a Ja

The Apache Software Foundation 81 Dec 26, 2022
Mirror of Apache SystemML

Apache SystemDS Overview: SystemDS is a versatile system for the end-to-end data science lifecycle from data integration, cleaning, and feature engine

The Apache Software Foundation 940 Dec 25, 2022
Mirror of Apache SystemML

Apache SystemDS Overview: SystemDS is a versatile system for the end-to-end data science lifecycle from data integration, cleaning, and feature engine

The Apache Software Foundation 940 Dec 25, 2022
Mirror of Apache Storm

Master Branch: Storm is a distributed realtime computation system. Similar to how Hadoop provides a set of general primitives for doing batch processi

The Apache Software Foundation 6.4k Jan 3, 2023
Real-time Query for Hadoop; mirror of Apache Impala

Welcome to Impala Lightning-fast, distributed SQL queries for petabytes of data stored in Apache Hadoop clusters. Impala is a modern, massively-distri

Cloudera 27 Dec 28, 2022
Mirror of Apache Qpid

We have moved to using individual Git repositories for the Apache Qpid components and you should look to those for new development. This Subversion re

The Apache Software Foundation 125 Dec 29, 2022
Mirror of Apache Velocity Engine

Title: Apache Velocity Engine Apache Velocity Welcome to Apache Velocity Engine! Apache Velocity is a general purpose template engine written in Java.

The Apache Software Foundation 298 Dec 22, 2022
Now redundant weka mirror. Visit https://github.com/Waikato/weka-trunk for the real deal

weka (mirror) Computing and Mathematical Sciences at the University of Waikato now has an official github organization including a read-only git mirro

Benjamin Petersen 313 Dec 16, 2022