On Tue, Apr 5, 2011 at 8:37 PM, Yudong Gao <st...@umich.edu> wrote: > One thing I am worrying about is how to maintain the location > information for each row. The current partitioner maps a key to MD5 > hash, and it is almost impossible to control the hashed token by > manipulating the value of the key. Also, maintaining a key-to-location > mapping would be unscalable. My initial thought is to use the key > string as the token directly, so that the location information can be > binded into the key. This minimize the changes to the other > components.
This is what ByteOrderedPartitioner does, but that tends to create hot spots since sequential keys are stored on the same node. A better solution would be to just push the DecoratedKey into the ReplicationStrategy so it can make its decision before information is thrown away. > Do you know how the existing application is achieving this without the > per-row support? All existing applications places replicas by keyspace, not by row. -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of DataStax, the source for professional Cassandra support http://www.datastax.com