展开查看详情
1.
2.
3.
4.
5.
6.
7.
8.
9. 0-25 76-100 26-50 51-75
10. 10.0.0.1 client 00-25 76-100 51-75 A 10.0.0.4 10.0.0.2 76-100 26-50 51-75 00-25 Node Primary replica replica 26-50 76-100 10.0.0.1 00-25 76-100 51-75 D 10.0.0.2 26-50 00-25 76-100 B 10.0.0.3 51-57 26-50 00-25 10.0.0.4 76-100 51-75 26-50 10.0.0.3 51-75 26-50 00-25 C
11. 0-25 • Hint-handoff Gossip • Read-repair Gossip • Repair 76-100 26-50 X 51-75
12.• bootstrapping • random token, seed gossips • resharding gossips tokens
13.Node1 Node1 Node1 node8 Node2 node3 node4 node7 node3 Node6 node4 Node2 Node2 Node5
14.
15.
16.• Cql • • ,SASI • • UDF/UDA • (CAS) • counter • CDC • TTL • Batch • Online schema change
17.• • Select * from from users where id=? • •
18. cql antlr Modification mutation Statement ParsedState prepair Prepared ment statement SelectState readCommd ment
19.
20. Header offset1 … offsetN entry1 … entryN Summary.db partitionKey Index_file_ position RowIndexEntry RowIndexEntry …… RowIndexEntry …… RowIndexEntry Index.db key_length partitionKey dataFilePositi size headerLength deletionTime columnsIndex IndexInfo1 … offset1 … on _size firstClustering lastClustering startPosition delta_width end_open_marker end_open_marker? (firstClustering _present datafile position) ParitionKey1 partitionKey2 …… partitionKeyN Data.db clustering1 …. clusteringN
21.• • User_id1 FR … … User_id2 US … … User_id4 US … … User_id7 FR … … User_id5 US … … FR User_id1 User_id7 … US User_id4 User_id5 … US User_id2 … …
22.
23.
24.
25.• UDF/UDA definition coordinate • coordinator UDF CREATE/ALTER • UDF java, coordinator Eclipse ECJ compiler • UDF js, javax.script.ScriptEngine • coordinator • coordinator classloader udf • udf • The coordinator schema change • UDF query
26.
27.basic-paxos Epaxos
28.
29. mv Commitlog segment cdc_raw_directory commitLog