项目作者: zoltan-nz

项目描述 :
Learning Cassandra, Cassandra tutorial
高级语言: Shell
项目地址: git://github.com/zoltan-nz/cassandra-exercise.git
创建时间: 2017-03-23T10:06:07Z
项目社区:https://github.com/zoltan-nz/cassandra-exercise

开源协议:

下载


Learning Cassandra

Content

  1. ./
  2. ├─ practicing/ --- Miscellaneous files
  3. ├─ assignment-1/ --- Files related to Assignment 1
  4. ├─ assignment-2/ --- Files related to Assginement 2

Setup Cassandra environment on Mac

Install cassandra with brew:

  1. $ brew install cassandra

Create a loop alias for cluster IPs. A bash command with the following content in ./bin/loop-alias.sh.

  1. #!/bin/bash
  2. sudo ifconfig lo0 alias 127.0.0.2 up
  3. sudo ifconfig lo0 alias 127.0.0.3 up
  4. sudo ifconfig lo0 alias 127.0.0.4 up
  5. sudo ifconfig lo0 alias 127.0.0.5 up
  6. sudo ifconfig lo0 alias 127.0.0.6 up
  7. sudo ifconfig lo0 alias 127.0.0.7 up
  1. $ ./bin/loop-alias.sh

Run cassandra:

  1. $ cassandra -f

Run the project

  • Run loop-alias.sh
  • Run ccm start
  • Launch shell ccm node1 cqlsh

Cassandra Notes

  1. Reading driver and vehicle data must be strongly consistent.

    STRONG -> QUORUM

  2. Reading Data Point and other data may be eventually consistent.

    EVENTUALLY -> LEVEL SET ONE

  • single data center

  • A table with lot of updates has to use LeveledCompactionStrategy
    `CREATE TABLE