<commit_before>DCOS Cassandra Service Guide
======================

[Overview](#overview)
- [Benefits](#benefits)
- [Features](#features)
- [Related Services](#related-services)

[Getting Started](#getting-started)
- [Quick Start](#quick-start)
- [Install and Customize](#install-and-customize)
  - [Default install configuration](#default-install-configuration)
  - [Custom install configuration](#custom-install-configuration)
- [Multiple Cassandra Cluster Installation](#multiple-cassandra-cluster-installation)
- [Uninstall](#uninstall)

[Configuring](#configuring)
- [Changing Configuration at Runtime](#changing-configuration-at-runtime)
  - [Configuration Deployment Strategy](#configuration-deployment-strategy)
  - [Configuration Update Plans](#configuration-update-plans)
  - [Configuration Update REST API](#configuration-update-rest-api)
- [Configuration Options](#configuration-options)
  - [Service Configuration](#service-configuration)
  - [Node Configuration](#node-configuration)
  - [Cassandra Application Configuration](#Cassandra-application-configuration)
  - [Communication Configuration](#communication-configuration)
  - [Hinted Handoff Configuration](#hinted-handoff-configuration)
  - [Snitch Configuration](#snitch-configuration)

[Connecting Clients](#connecting-clients) <!-- note this section may disappear -->

[Managing](#managing) <!-- note these sections may disappear -->
- [Add a Node](#add-a-node)
- [Cleanup](#cleanup)
- [Backup and Restore](#backup-and-restore)
  - [Backup](#backup)
    - [Backup Using the CLI](#backup-using-the-cli)
    - [Backup using the API](#backup-using-the-api)
  - [Restore](#restore)
    - [Restore Using the DCOS CLI](#Restore Using the DCOS CLI)
    - [Restore Using the API](#restore-using-the-api)

[Upgrading Software](#upgrading-software) <!-- note this section may disappear -->

[Troubleshooting](#troubleshooting)<!-- note there is not much here -->

[Limitations](#limitations)

[API Reference](#api-reference)
- [Connection Information](#connection-information)
- [Node Operations](#node-operations)
  - [Add Node](#add-node)
  - [Remove Node](#remove-node)

[Development](#development)

## Overview

DCOS Cassandra is an automated service that makes it easy to deploy and manage on Mesosphere DCOS, eliminating nearly all of the complexity traditional associated with managing a Cassandra cluster. Apache Cassandra is distributed database management system designed to handle large amounts of data across many servers, providing horizonal scalablity and high availability with no single point of failure, with a simple query language (CQL). For more information on Apache Cassandra, see the Apache Cassandra [documentation] (http://docs.datastax.com/en/cassandra/2.2/pdf/cassandra22.pdf). DCOS Cassandra gives you direct access to the Cassandra API so that existing applications can interoperate. You can configure and install DCOS Cassandra in moments. Multiple Cassandra clusters can be installed on DCOS and managed independently, so you can offer Cassandra as a managed service to your organization.

### Benefits

DCOS Cassandra offers the following benefits:

- Easy installation
- Multiple Cassandra clusters
- Elastic Cluster Scaling
- Replication for high availability
- Integrated monitoring


### Features

DCOS Cassandra provides the following features:

- Single command installation for rapid provisioning
- Persistent Storage volumes for enhanced data durability
- Runtime configuration and software updates for high availablity
- Health checks and metrics for monitoring
- Backup and restore for disaster recovery

### Related Services

- [DCOS Spark](https://docs.mesosphere.com/manage-service/spark)

## Getting Started

### Quick Start

- Step 1. Install a Cassandra cluster from the DCOS CLI.

```bash
$ dcos package install cassandra
```

Step 2. [SSH into an agent node](https://docs.mesosphere.com/administration/sshcluster/), and then launch a docker container:

```
$ docker run --net=host -it mohitsoni/alpine-cqlsh:2.2.5 /bin/sh
```

Step 3. Run /tmp/create.sh from inside the docker container to create a `demo` keyspace with a `map` table:

```
$ /tmp/create.sh
```

Step 4. Insert Fortune 1000 companies into the table:

``` bash
$ cqlsh -f /tmp/insert.cql <!-- need to specify the host before -f -- how to do this? -->
```

Step 6. Execute following query to show the data:

```bash
USE demo; SELECT * from demo.map;
```

### Install and Customize

#### Default install configuration

To start a basic test cluster, run the following command on the DCOS CLI:

``` bash
$ dcos package install cassandra
```

This command creates a new Cassandra cluster. Two clusters cannot share the same name, so installing additional clusters beyond the default cluster requires [customizing the `framework-name` at install time](#custom-install-configuration) for each additional instance.<commit_msg>moved the docker location of cqlsh<commit_after>DCOS Cassandra Service Guide
======================

[Overview](#overview)
- [Benefits](#benefits)
- [Features](#features)
- [Related Services](#related-services)

[Getting Started](#getting-started)
- [Quick Start](#quick-start)
- [Install and Customize](#install-and-customize)
  - [Default install configuration](#default-install-configuration)
  - [Custom install configuration](#custom-install-configuration)
- [Multiple Cassandra Cluster Installation](#multiple-cassandra-cluster-installation)
- [Uninstall](#uninstall)

[Configuring](#configuring)
- [Changing Configuration at Runtime](#changing-configuration-at-runtime)
  - [Configuration Deployment Strategy](#configuration-deployment-strategy)
  - [Configuration Update Plans](#configuration-update-plans)
  - [Configuration Update REST API](#configuration-update-rest-api)
- [Configuration Options](#configuration-options)
  - [Service Configuration](#service-configuration)
  - [Node Configuration](#node-configuration)
  - [Cassandra Application Configuration](#Cassandra-application-configuration)
  - [Communication Configuration](#communication-configuration)
  - [Hinted Handoff Configuration](#hinted-handoff-configuration)
  - [Snitch Configuration](#snitch-configuration)

[Connecting Clients](#connecting-clients) <!-- note this section may disappear -->

[Managing](#managing) <!-- note these sections may disappear -->
- [Add a Node](#add-a-node)
- [Cleanup](#cleanup)
- [Backup and Restore](#backup-and-restore)
  - [Backup](#backup)
    - [Backup Using the CLI](#backup-using-the-cli)
    - [Backup using the API](#backup-using-the-api)
  - [Restore](#restore)
    - [Restore Using the DCOS CLI](#Restore Using the DCOS CLI)
    - [Restore Using the API](#restore-using-the-api)

[Upgrading Software](#upgrading-software) <!-- note this section may disappear -->

[Troubleshooting](#troubleshooting)<!-- note there is not much here -->

[Limitations](#limitations)

[API Reference](#api-reference)
- [Connection Information](#connection-information)
- [Node Operations](#node-operations)
  - [Add Node](#add-node)
  - [Remove Node](#remove-node)

[Development](#development)

## Overview

DCOS Cassandra is an automated service that makes it easy to deploy and manage on Mesosphere DCOS, eliminating nearly all of the complexity traditional associated with managing a Cassandra cluster. Apache Cassandra is distributed database management system designed to handle large amounts of data across many servers, providing horizonal scalablity and high availability with no single point of failure, with a simple query language (CQL). For more information on Apache Cassandra, see the Apache Cassandra [documentation] (http://docs.datastax.com/en/cassandra/2.2/pdf/cassandra22.pdf). DCOS Cassandra gives you direct access to the Cassandra API so that existing applications can interoperate. You can configure and install DCOS Cassandra in moments. Multiple Cassandra clusters can be installed on DCOS and managed independently, so you can offer Cassandra as a managed service to your organization.

### Benefits

DCOS Cassandra offers the following benefits:

- Easy installation
- Multiple Cassandra clusters
- Elastic Cluster Scaling
- Replication for high availability
- Integrated monitoring


### Features

DCOS Cassandra provides the following features:

- Single command installation for rapid provisioning
- Persistent Storage volumes for enhanced data durability
- Runtime configuration and software updates for high availablity
- Health checks and metrics for monitoring
- Backup and restore for disaster recovery

### Related Services

- [DCOS Spark](https://docs.mesosphere.com/manage-service/spark)

## Getting Started

### Quick Start

- Step 1. Install a Cassandra cluster from the DCOS CLI.

```bash
$ dcos package install cassandra
```

Step 2. [SSH into an agent node](https://docs.mesosphere.com/administration/sshcluster/), and then launch a docker container:

```
$ docker run --net=host -it mesosphere/cqlsh:2.2.5 /bin/sh
```

Step 3. Run /tmp/create.sh from inside the docker container to create a `demo` keyspace with a `map` table:

```
$ /tmp/create.sh
```

Step 4. Insert Fortune 1000 companies into the table:

``` bash
$ cqlsh -f /tmp/insert.cql <!-- need to specify the host before -f -- how to do this? -->
```

Step 6. Execute following query to show the data:

```bash
USE demo; SELECT * from demo.map;
```

### Install and Customize

#### Default install configuration

To start a basic test cluster, run the following command on the DCOS CLI:

``` bash
$ dcos package install cassandra
```

This command creates a new Cassandra cluster. Two clusters cannot share the same name, so installing additional clusters beyond the default cluster requires [customizing the `framework-name` at install time](#custom-install-configuration) for each additional instance.
{'fraction_non_alphanumeric': 0.11181327081846906, 'fraction_numerical': 0.0032616450922434, 'mean_word_length': 4.993891264508247, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2576276', 'n_tokens_mistral': 2784, 'n_tokens_neox': 2510, 'n_words': 950}