Data Partitioning in Cassandra

自闭症网瘾萝莉.ら 提交于 2019-12-11 17:23:49

问题


Two questions,

Lets say I have three cassandra nodes / environments setup, Node 1, Node 2 and Node 3.

where I specified the tokens for

Node 1 as 1 to 60, Node 2 as 61 to 120, Node 3 as 121 to 255.

1) As per the Cassandra documentation, for the partition key matching 1 to 60 it should be there in Node 1 but during replication this partition data of 1 to 60 is replicated to Node 2 and Node 3. So why do we need the partition separation in it? In this case, from which node the read happens for this partitioned data?

Next question, 2) If a node goes down, Will there be a RE-PARTITIONING between Cassandra nodes?


回答1:


1) Since number of nodes=replication factor the tokens won't matter as much. Depending on the balancing policy in your client the tokens can matter as to which node gets the request, e.g. TokenAwarePolicy.

2) Distribution of token ranges only happen when scaling your cluster.



来源:https://stackoverflow.com/questions/47587306/data-partitioning-in-cassandra

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!