Code Monkey home page Code Monkey logo

elassandra's Introduction

Elassandra Build Status

Elassandra is a fork of Elasticsearch modified to run as a plugin for Apache Cassandra in a scalable and resilient peer-to-peer architecture. Elasticsearch code is embedded in Cassanda nodes providing advanced search features on Cassandra tables and Cassandra serve as an Elasticsearch data and configuration store.

Elassandra architecture

Elassandra supports Cassandra vnodes and scale horizontally by adding more nodes.

News

Build Status Doc Status

Project documentation is available at doc.elassandra.io.

  • 2017-06-17 Release 2.4.5.2 Elasticsearch 2.4.5 + Cassandra 3.10
  • 2017-05-22 Release 2.4.5.1 Elasticsearch 2.4.5 + Cassandra 3.0.13
  • 2017-04-27 Release 2.4.2-13
    • Project refactoring, Elassandra is now an Elasticsearch plugin for Strapadata-Cassandra (see How to contribute below).
    • Search performance improvement by introducing a new token_ranges_bitset_cache (see Optimized search requests in the documentation)
  • 2017-02-25 Release 2.4.2-9 Significant write performance improvement
  • 2017-01-15 Release 2.4.2-4 Upgrade to Cassandra 3.0.10
  • 2016-12-25 Release 2.4.2-2 Upgrade to Elasticsearch 2.4.2 + pass 3000 unit tests from Elasticsearch
  • 2016-10-24 Release 2.1.1-18 Add multi-threaded index rebuild and optimized search routing (see RandomSearchStrategy)
  • 2016-09-05 Release 2.1.1-17 Add spark support with a modified version of elasticsearch-hadoop-2.2
  • 2016-08-12 Release 2.1.1-16 Upgrade to cassandra 2.2.7
  • 2016-07-10 Release 2.1.1-15 Bug fix
  • 2016-06-21 Release 2.1.1-12 Add support for index partitioning and cross-datacenter mapping replication
  • 2016-05-10 Release 2.1.1-9 Upgrade to cassandra 2.2.5
  • 2016-04-17 Release 2.1.1-8 New feature, index cassandra static columns
  • 2016-03-18 Release 2.1.1-6 Add support for SQL plugin (from NLPchina) and JDBC driver (from Anchormen).
  • 2016-02-16 Release 2.1.1-2 Remove build dependency to elasticsearch parent project.
  • 2016-02-01 Release 2.1.1-1 Add support for parent-child relationship.
  • 2016-01-28 Release 2.1.1 based on Elasticsearch 2.1.1 and cassandra 2.2.4.
  • 2015-12-20 Release 0.5 Re-index you data from cassandra 2.2.4 with zero downtime.
  • 2015-11-15 Release 0.4 New elassandra tarball ready-to-run.

Benefits of Elassandra

For cassandra users, elassandra provides elasticsearch features :

  • Cassandra update are indexed in Elasticsearch.
  • Full-Text and spatial search on your cassandra data.
  • Real-time aggregation (does not require Spark or Hadoop to GROUP BY)
  • Provide search on multiple keyspaces and tables in one query.
  • Provide automatic schema creation and support nested document using User Defined Types.
  • Provide a read/write JSON REST access to cassandra data.
  • There are many elasticsearch plugins to import data in cassandra or to visualize your data, like Kibana for example.

For Elasticsearch users, elassandra provides useful features :

  • Change the mapping and re-index your data from cassandra with zero downtime.
  • Cassandra could be your unique datastore for indexed and non-indexed data, it's easier to manage and secure. Source documents are now stored in Cassandra, reducing disk space if you need a noSql database and elasticsearch.
  • In elassandra, Elasticsearch is masterless and split-brain resistant because cluster state is now managed within a cassandra lightweight transactions.
  • Write operations are not more restricted to one primary shards, but distributed on all cassandra nodes in a virtual datacenter. Number of shards does not limit your write throughput, just add some elassandra nodes to increase both read and write throughput.
  • Elasticsearch indices can be replicated between many cassandra datacenters, allowing to write to the closest datacenter and search globally.
  • The cassandra driver is Datacenter and Token aware.
  • Cassandra supports partial update and distributed counters.

Quick start

  • Ensure your JAVA_HOME points to your JDK 8 installation.
  • Extract the distribution tarball in your install directory.
  • Define the CASSANDRA_HOME environment variable: export CASSANDRA_HOME=<elassandra_install_dir>
  • Load useful aliases : source $CASSANDRA_HOME/bin/aliases.sh
  • Start a node: $CASSANDRA_HOME/bin/cassandra -e (or elstart alias)
  • Check the Cassandra status: $CASSANDRA_HOME/bin/nodetool status
  • Check the Elasticsearch cluster state: curl -XGET localhost:9200/_cluster/state (or state alias)

Support

How to contribute

Elassandra is based on a fork of Elasticsearch acting as a plugin for Apache Cassandra :

  • The ElassandraDaemon class override the CassandraDaemon class in order to manage Elasticsearch internal services.
  • The ElasticSecondaryIndex class implements the Cassandra Index interface to write in Elasticsearch indices.

Elassandra class inheritance

To achieve these operations, both Cassandra and Elasticsearch requires some modifications located in two forks:

A fork of Apache Cassandra including slight modifications, see (https://github.com/strapdata/cassandra).

A fork of Elasticsearch (aka Strapdata-Elasticsearch, branch ${version}-strapdata) including modifications in :

As shown below, forked Cassandra and Elasticsearch projects can change independently and changes can be rebased periodically into Strapdata-Cassandra or Elassandra (aka Strapdata-Elasticsearch).

Elassandra developpement process

Elassandra contains 2 references to the strapdata-cassandra :

  • The Elasticsearch core/pom.xml include a maven dependency on the strapdata-cassandra project :

      ```
      <dependency>
        <groupId>com.strapdata.cassandra</groupId>
        <artifactId>cassandra-all</artifactId>
        <version>3.0.x</version>
      </dependency>
      ```
    
  • In order to build the elassandra tarball and packages, the elassandra project includes a reference to the strapdata-cassandra as git submodule located in core/cassandra.

Elassandra is an opensource project, contributors are welcome to rise issues or pull requests on both strapdata-cassandra or elassandra github repositories.

Bug reports

When submitting an issue, please make sure that :

  • You are testing against the latest version of Elassandra.
  • You're not in the case of a known Elassandra limitation, see http://doc.elassandra.io/en/latest/limitations.html.
  • Elassandra behavior is abnormally different from the standard Cassandra or Elasticsearch. For example, like Elasticsearch, Elassandra does not display default mappings unless requested, but this is the expected behavior.

It is very helpful if you can provide a test case to reproduce the bug and the associated error logs or stacktrace. See your conf/logback.xml to increase logging level in the logs/system.log file, and run nodetool setlogginglevel to dynamically update your logging level.

Feature requests

Your're welcome to rise an issue on https://github.com/strapdata/elassandra for new feature, describing why and how it should work.

Contributing code and documentation changes

Contributors can clone repositories and follow guidelines from Elasticsearch and Cassandra :

When cloning Elassandra, use git clone --recurse-submodules https://github.com/strapdata/elassandra to clone the strapdata-cassandra submodule and check that your are using the same strapdata-cassandra version in your core/pom.xm and in this submodule. Alternatively, this submodule can point to your own cassandra branch, assuming this branch include mandatory modifications to support Elassandra, see strapdata-cassandra for details.

If you forgot the --recurse-submodules when cloning, you can also fetch the cassandra submodule with git submodule update --init and git checkout cassandra-3.x-strapdata to set the strapdata branch.

Then, to build from sources, run mvn clean packages -DskipTests.

Elassandra documentation is based on sphinx and published on readthedoc.org. Source RestructuredText files are located at Elassandra source documentation. To build the documentation, just run make html from the ${project.dir}/docs/elassandra.

Submitting your changes

  1. Test you changes

You can build Elassandra single-node unit tests mixing Elasticsearch and Cassandra CQL/nodetool requests. See Elassandra Testing documentation and existing Elassandra unit tests. For multi-nodes testing, you can use ecm, a fork of ccm running Elassandra.

  1. Rebase your changes

Like with Elasticsearch, update your local repository with the most recent code from the main Elassandra repository, and rebase your branch on top of the latest master branch. We prefer your initial changes to be squashed into a single commit. Later, if we ask you to make changes, add them as separate commits. This makes them easier to review. As a final step before merging we will either ask you to squash all commits yourself or we'll do it for you.

  1. Submit a pull request

Finally, push your local changes to your forked copy of the elassandra repository and submit a pull request. In the pull request, choose a title which sums up the changes that you have made, including the issue number (ex: #91 null_value support), and provide details about your changes.

As usual, you should never force push to a publicly shared branch, but add incremental commits.

License

This software is licensed under the Apache License, version 2 ("ALv2"), quoted below.

Copyright 2015-2017, Strapdata ([email protected]).

Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.

Acknowledgments

  • Elasticsearch and Kibana are trademarks of Elasticsearch BV, registered in the U.S. and in other countries.
  • Apache Cassandra, Apache Lucene, Apache, Lucene and Cassandra are trademarks of the Apache Software Foundation.

elassandra's People

Contributors

alexksikes avatar bleskes avatar brwe avatar cbuescher avatar clintongormley avatar colings86 avatar dadoonet avatar dakrone avatar danielmitterdorfer avatar drewr avatar honzakral avatar imotov avatar jasontedor avatar javanna avatar jaymode avatar johtani avatar jpountz avatar karmi avatar kimchy avatar martijnvg avatar mikemccand avatar nik9000 avatar nknize avatar polyfractal avatar rjernst avatar rmuir avatar s1monw avatar spinscale avatar tlrx avatar uboness avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.