开发者

making cassandra store data on a local node

What is a simple way of configuring a cassandra cluster so that if I try to store a key in it, it will be stored in the local node to which I issue the set/write command?

I am looking at the IPartitioner which allows me to specify how the key will be hashed but it seems a bit heavy weight for something like abov开发者_开发问答e.

Thanks!


If you were able to arbitrarily write keys to arbitrary nodes, then on lookup the system would not know where the data for that key lived. The system would have to do a full cluster lookup which would be super slow.

By design, Cassandra spreads the data around in a known way so that lookups are quick.

Check out this post by Jonathan Ellis the primary maintainer of Cassandra.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜