Git Product home page Git Product logo

cassandra's Introduction

Cassandra Java and Scala Examples

This repo shows examples using Apache Cassandra and Datastax Java Driver for Apache Cassandra

Connecting to Cassandra Using Java and Scala programming languages.
Basic example to test the connection with Cassandra.
Connecting to cassandra in a secured way .
Performing CRUD oprations in Cassandra.

Cassandra Installation:

wget http://downloads.datastax.com/community/dsc-cassandra-3.0.9-bin.tar.gz
tar -zxvf dsc-cassandra-3.0.9-bin.tar.gz

vi ~/.bash_profile
export CASSANDRA_HOME=/users/apps/cassandra/dsc-cassandra-3.0.9/
export PATH=$CASSANDRA_HOME/bin:$PATH
source ~/.bash_profile

Start Cassandra as a background process:

sudo cassandra&
cqlsh

Creating Cassandra Keyspace and Table :

create keyspace dev with replication = {'class':'SimpleStrategy','replication_factor':1};
use dev;
create table emp (empid int primary key,emp_first varchar, emp_last varchar, emp_dept varchar);

insert into emp (empid, emp_first, emp_last, emp_dept) values (1,'rev','kumar','eng');
insert into emp (empid, emp_first, emp_last, emp_dept) values (2,'smith','reddy','eng');
insert into emp (empid, emp_first, emp_last, emp_dept) values (3,'shyam','sunder','CA');

See also for Reference :

Cassandra Installation on Windows:
http://cassandra.apache.org/
http://www.luketillman.com/developing-with-cassandra-on-windows/

Configuring data consistency :
http://docs.datastax.com/en/archived/cassandra/2.0/cassandra/dml/dml_config_consistency_c.html

Using Cassandra CQL :
https://docs.datastax.com/en/cql/3.1/cql/cql_using/about_cql_c.html

Node calculator :
https://www.ecyrd.com/cassandracalculator/

Cassandra Partitioning & Clustering Keys Explained :
http://datascale.io/cassandra-partitioning-and-clustering-keys-explained/
https://www.datastax.com/dev/blog/the-most-important-thing-to-know-in-cassandra-data-modeling-the-primary-key

Understanding How Cassandra Stores Data :
https://www.hakkalabs.co/articles/how-cassandra-stores-data

Significance of Vnodes in Cassandra:
http://stackoverflow.com/questions/25379457/what-is-virtual-nodes-and-how-it-is-helping-during-partitioning-in-casssandra
http://stackoverflow.com/questions/38423888/significance-of-vnodes-in-cassandra
http://www.datastax.com/dev/blog/virtual-nodes-in-cassandra-1-2

Accessing Cassandra from Spark in Java:
http://www.datastax.com/dev/blog/accessing-cassandra-from-spark-in-java

Cassandra-Spark-Demo Project : https://github.com/doanduyhai/Cassandra-Spark-Demo

DataStax course on Apache Cassandra /spark :
https://academy.datastax.com/resources/ds201-foundations-apache-cassandra
https://academy.datastax.com/resources/getting-started-apache-spark

Install and setup Apache Cassandra Single Node cluster : http://www.techburps.com/cassandra/cassandra-single-node-cluster/59/

Install and setup Apache Cassandra Multiple Node cluster : http://www.techburps.com/cassandra/cassandra-multiple-node-cluster/60/


You can reach me for any suggestions/clarifications on : [email protected]
Feel free to share any insights or constructive criticism. Cheers!!
#Happy Learning!!!..

cassandra's People

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.