cassandra Internal data structure

来源:互联网 发布:程序员 书籍 编辑:程序博客网 时间:2024/06/06 03:35

Understanding How CQL3 Maps to Cassandra’s Internal Data Structure ?


http://opensourceconnections.com/blog/2013/07/24/understanding-how-cql3-maps-to-cassandras-internal-data-structure/



https://www.datastax.com/dev/blog/thrift-to-cql3


partition key 类似row key, it is a wide row in cassandra internal storage.

partition 默认partitioner:  Murmur3Partitioner: The Murmur3Partitioner uses the MurmurHash function. This hashin g function creates a 64-bit hash value of the partition key. The possible range of hash values is from -2的63次方 to +2的63次方-1 , 这个数字对应的数目可能是个天文数字;

partition设计最重要,根据query 设计 表的结构(换个词就是data model,瞬间高大上), 不用担心partition的数目太多(天文数字),需要注意的是一个partition (实际内部存储就是一个wide row, 超级长的行)的size不能太大,
 如果size太大, 超过50M,  这会大大影响查询查询效率,最终结果表现就是蛋疼的问题:read timeout!!!!

先写这么多了,有空再补充!!!