Giter Club home page Giter Club logo

cassandra-spark-cluster's Introduction

Cassandra + Spark Cluster

This repository provides everything you need to run Cassandra Cluster in Docker, and is tuned for fast container startup.

Getting started

$ git clone https://github.com/eSolutionsGrup/cassandra-spark-cluster.git
$ cd cassandra-spark-cluster
$ docker-compose up -d

Run docker-compose ps to list your Cassandra nodes:

$ docker-compose ps
             Name                           Command               State                                                              Ports                                                            
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cassandrasparkcluster_node01_1   /docker-entrypoint.sh cass ...   Up      0.0.0.0:7000->7000/tcp, 0.0.0.0:7001->7001/tcp, 0.0.0.0:7199->7199/tcp, 0.0.0.0:9042->9042/tcp, 0.0.0.0:9160->9160/tcp      
cassandrasparkcluster_node02_1   /docker-entrypoint.sh cass ...   Up      0.0.0.0:17000->7000/tcp, 0.0.0.0:17001->7001/tcp, 0.0.0.0:17199->7199/tcp, 0.0.0.0:19042->9042/tcp, 0.0.0.0:19160->9160/tcp 
cassandrasparkcluster_node03_1   /docker-entrypoint.sh cass ...   Up      0.0.0.0:27000->7000/tcp, 0.0.0.0:27001->7001/tcp, 0.0.0.0:27199->7199/tcp, 0.0.0.0:29042->9042/tcp, 0.0.0.0:29160->9160/tcp 

After starting check cluster status, run this in the container (docker exec -ti `docker ps --format '{{.Names}}' | grep node01` bash)

nodetool status

If the cluster started correctly you should see back a few lines, three of them starting with UN, like this

Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address      Load       Tokens       Owns    Host ID                               Rack
UN  192.168.0.2  4.9 MiB    256          ?       516367f2-684b-48c0-8edf-cb653a44ef5b  rack1
UN  192.168.0.3  3.14 MiB   256          ?       0aeccf1a-d86f-4bec-968c-cfdea9fb019b  rack1
UN  192.168.0.4  3.5 MiB    256          ?       9fa89b89-ae38-49c6-8c1a-f8c7c1d50359  rack1

This means that all the nodes are up (U) and operating normally (N)

Zeppelin

Cassandra Interpreter config

  • Zeppelin -> Interpreter
  • Search for cassandra
  • Edit
  • Change property:
    cassandra.hosts  	node01,node02,node03

Spark Interpreter config

  • Zeppelin -> Interpreter
  • Search for spark
  • Edit
  • Add property:
    spark.cassandra.connection.host 	node01,node02,node03
  • Check property:
    master 	local[*]
  • Add dependencies and exclude netty:
artifact exclude
com.datastax.spark:spark-cassandra-connector_2.11:2.3.2 io.netty:netty
org.postgresql:postgresql:9.2-1004-jdbc41

cassandra-spark-cluster's People

Contributors

nflucian avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  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.