假设,存在结构如下表:不太清楚有关Cassandra的反模式
create table cities (
root text,
name text,
primary key(root,name)
) with clustering order by (name asc); -- for getting them sorted
insert into cities(root,name) values('.','Moscow');
insert into cities(root,name) values('.','Tokio');
insert into cities(root,name) values('.','London');
select * from cities where root='.'; -- get'em sorted asc
在指定的3复制因子的密钥空间和使用RandomPartitioner,将有3个副本每个行在3个节点上:主节点确定用于存储该行的散列值和2个下一个散列值。为什么应该有一个热点?从所有副本读取不是负载平衡?
请勿使用RandomPartitioner。使用更新的Murmur3Partitioner。 – 2014-09-02 18:17:38