The OrderPreservingPartitioner will treat the key byte array as a UTF8 string. Specifically it uses the nio Charset decoder http://download.oracle.com/javase/1.4.2/docs/api/java/nio/charset/Charset.html to turn the byte array into a string.
The ByteOrderedPartitioner will treat the key as a simple byte array. Aaron On 24/01/2011, at 5:10 PM, raoyixuan (Shandy) wrote: > How to compare the key itself (as a byte array) to the tokens in the ring in > OrderPreservingPartitioner? As in know, the node which value is larger than > key value will handle the key in random partitioner > > From: Tyler Hobbs [mailto:ty...@riptano.com] > Sent: Monday, January 24, 2011 11:43 AM > To: user@cassandra.apache.org > Subject: Re: about the partitioner type > > http://www.datastax.com/docs/0.7/operations/clustering#tokens-partitioners-and-the-ring > > - Tyler > > 2011/1/23 raoyixuan (Shandy) <raoyix...@huawei.com> > whether the random/order partitioner specify the token for the node ,not > for key? > > 华为技术有限公司 Huawei Technologies Co., Ltd. > > > > > Phone: 28358610 > Mobile: 13425182943 > Email: raoyix...@huawei.com > 地址:深圳市龙岗区坂田华为基地 邮编:518129 > Huawei Technologies Co., Ltd. > Bantian, Longgang District,Shenzhen 518129, P.R.China > http://www.huawei.com > 本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁 > 止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中 > 的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! > This e-mail and its attachments contain confidential information from HUAWEI, > which > is intended only for the person or entity whose address is listed above. Any > use of the > information contained herein in any way (including, but not limited to, total > or partial > disclosure, reproduction, or dissemination) by persons other than the > intended > recipient(s) is prohibited. If you receive this e-mail in error, please > notify the sender by > phone or email immediately and delete it! > >