Git Product home page Git Product logo

spark-cassandra-demo's Introduction

Cassandra Spark Demo

Retrieve Sample Data

curl http://deron.meranda.us/data/census-dist-all-last.txt.gz | gunzip - > cassandra_import_example/data/census-dist-all-last.txt
curl http://deron.meranda.us/data/census-dist-female-first.txt > cassandra_import_example/data/census-dist-female-first.txt
curl http://deron.meranda.us/data/census-dist-male-first.txt > cassandra_import_example/data/census-dist-male-first.txt

Setup

  1. Install DSE
    1. Download installer - http://www.datastax.com/download
    2. Run installer
  2. Install Solr

Running Services

  1. Start DSE (w/ Spark)

    ~/dse/bin/dse cassandra -k
  2. Start Solr

    cd solr
    bin/solr -c

Loading Schema

Ensure the services are both running

  1. DSE

    cqlsh -f cassandra_import_example/schema.cql
  2. Solr

    solr/bin/solr create_collection -c solr_import_example -d solr_import_example/solr_core_config/

Building Examples

cd cassandra_import_example && mvn package
cp ~/dse/lib/dse-4.7.0.jar solr_import_example/lib/
cd solr_import_example && sbt assembly

Running Examples

java -jar cassandra_import_example/target/cassandra_import_example-1.0-SNAPSHOT-jar-with-dependencies.jar
dse spark-submit --executor-memory 1G target/scala-2.11/solr_import_example-assembly-1.0.jar

Stopping Services

dse cassandra-stop
solr/bin/solr stop

spark-cassandra-demo's People

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.