# Building Cassandra Storage Engine

{% hint style="info" %}
The Cassandra storage engine was removed in MariaDB 10.6.
{% endhint %}

This page describes how to build the [Cassandra Storage Engine](https://mariadb.com/docs/server/server-usage/storage-engines/legacy-storage-engines/cassandra/cassandra-storage-engine-overview).

## Getting the source code

The code is in bazaar branch at [lp:\~maria-captains/maria/5.5-cassandra](https://code.launchpad.net/~maria-captains/maria/5.5-cassandra).

Alternatively, you can download a tarball from

## Building

The build process is not fully streamlined yet. It is

* known to work on Fedora 15 and OpenSUSE
* known not to work on Ubuntu Oneiric Ocelot (see [MDEV-501](https://jira.mariadb.org/browse/MDEV-501)).
* known to work on Ubuntu Precise Pangolin

The build process is as follows

* Install Cassandra (we tried 1.1.3 ... 1.1.5, 1.2 beta versions should work but haven't been tested)
* Install the Thrift library (we used 0.8.0 and [0.9.0-trunk](https://thrift.apache.org/download)), only the C++ backend is needed.
  * we have installed it by compiling the source tarball downloaded from [thrift.apache.org](https://thrift.apache.org/)
* edit `storage/cassandra/CMakeLists.txt` and modify the `INCLUDE_DIRECTORIES` directive to point to Thrift's include directory.
* `export LIBS="-lthrift"`, on another machine it was "-lthrift -ldl"
* `export LDFLAGS=-L/path/to/thrift/libs`
* Build the server
  * we used BUILD/compile-pentium-max script (the name is for historic reasons. It will actually build an optimized amd64 binary)

## Running the server

Cassandra storage engine is linked into the server (ie, it is not a plugin). All you need to do is to make sure Thrift's libthrift.so can be found by the loader. This may require adjusting the LD\_LIBRARY\_PATH variable.

## Running tests

There is a basic testsuite. In order to run it, one needs

* Start Cassandra on localhost
* Set PATH so that `cqlsh` and `cassandra-cli` binaries can be found
* From the build directory, run

```
cd mysql-test
./mysql-test-run t/cassandra.test
```

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/server-usage/storage-engines/legacy-storage-engines/cassandra/building-cassandra-storage-engine.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
