Cassandra apl Data structures Exceptions Service api Consistencylevel (4) Retrieval methods(5) Range query: returns matching keys(1) Modification methods(3) Others
Cassandra API • Data structures • Exceptions • Service API • ConsistencyLevel(4) • Retrieval methods(5) • Range query: returns matching keys(1) • Modification methods(3) • Others
Cassandra commands List of all clI commands Same as hel connect <hostname>/ <port> Connect to cassandras thrift service describe keyspace <keyspacename> Describe keyspace exit Exit cli help Display this help quit Exit cli show config file Display contents of config file show cluster name Display cluster name show keyspace Show list of keyspace show version show server version get <tbl. cf['<rowkey?' Get a slice of columns get <tbl>. cf>[ <rowkeyy ][<colEy?] Get a column value set<tbl>. < cf[<rowkey ][<colkey?]='<value> Set a column. cassandra
Cassandra commands
Partitioning and replication(1) · Consistent hashing DHT · Balance Monotonicity rea Load Virtual nodes Coordinator Preference list
Partitioning and replication(1) • Consistent hashing • DHT • Balance • Monotonicity • Spread • Load • Virtual nodes • Coordinator • Preference list
Partitioning and replication(2) 110 h(key 1) A N=3 h(key2) B
1 0 1/2 F E D C B A N=3 h(key2) h(key1) 9 Partitioning and replication(2)
Data versioning Always writeable ulitple versions puto return before all replicas geto many versions Vector clocks Reconciliation during reads by clients
Data Versioning • Always writeable • Mulitple versions – put() return before all replicas – get() many versions • Vector clocks • Reconciliation during reads by clients