Getting Started with Apache Zeppelin and Elassandra with Instaclustr

Menu

Instaclustr has retired support for Elassandra and now supports Elasticsearch.

Elassandra (Elasticsearch + Cassandra) is a fork of Elasticsearch modified to run on top of Apache Cassandra to provide advanced search features on Cassandra tables. In this tutorial we will walk you through the basic steps of setting up an Instaclustr Elassandra cluster with Zeppelin on Amazon Web Services (AWS) and how to query and visualize Elassandra indexes using Elasticsearch interpreter. The high-level steps are:

  1. Provision a cluster with Elassandra and Zeppelin
  2. Create a Zeppelin notebook based on Elasticsearch interpreter
  3. Add data to Elassandra using Zeppelin Elasticsearch interpreter
  4. Query and search data via Zeppelin notebook
  5. Conclusion

Provision a cluster with Elassandra and Zeppelin

  1. If you haven’t already signed up for an Instaclustr account, refer our support article to sign up and create an account.
  2. Once you have signed up for Instaclustr and verified your email, log in to the Instaclustr console and click the Create Cluster button.
  3. On the Create Cluster page, enter an appropriate name for your cluster.  Under Applications section, select:
    • Elassandra 5.5.0.13 (Cassandra 3.11) (preview)
    • Apache Zeppelin as an Add-on
  4. Under Data Centre section, select:
    • Amazon Web Services as the Infrastructure Provider
    • A minimum node size of t2.medium
  5. Leave the other options as default. Accept the terms and conditions and click Create Cluster button.The cluster will automatically provision and will be available for use once all nodes are in the running state.

Create a Zeppelin notebook based on Elasticsearch interpreter

  1. Once all nodes in the cluster are in the running state, click the Zeppelin tab. This will take you to Connection Details information page for Zeppelin.
  2. On the Connection Details information page, make note of Username and Password for Zeppelin and click the URL to login to Zeppelin dashboard..
  3. On the Zeppelin Dashboard, click Create new note. On the Create New Note dialog box, choose a name for the notebook, select elasticsearch as Default Interpreter and click Create Note button.
  4. The notebook has already been preconfigured to use Elasticsearch interpreter. Click the gear button on the top right of the notebook to see the enabled interpreters and more importantly Elasticsearch.
  5. Make sure Elasticsearch interpreter is at the top of the list and Cassandra interpreter is enabled. Click Save button to save the settings.

Add data to Elassandra using Zeppelin Elasticsearch interpreter

To start off, let’s index some data into Elassandra by running the commands below, one per paragraph.

Note: if Elasticsearch is not your default interpreter, you should have %elasticsearch at the top of each paragraph to get it to run.

Index some more data by running the following commands on the notebook:

 

Query and search data via Zeppelin notebook

Once the data is in Elassandra, we can search using Zeppelin, for example:

The result of a search query can also be viewed graphically (histograms, pie charts etc.) or downloaded as CSV (Comma Separated Values) or TSV (Tab Separated Values) file by clicking on the buttons marked in blue box in the above screenshot.

We can also search for specific words or strings:

Finally, to get the list of available commands, run:

Conclusion

In this tutorial you have learned how to:

  • Provision a cluster with Elassandra and Zeppelin
  • Create a Zeppelin notebook based on Elasticsearch interpreter
  • Add, query and search data via Zeppelin notebook

For more information, refer following resources:

Site by Swell Design Group