[ https://issues.apache.org/jira/browse/CASSANDRA-2917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202970#comment-13202970 ]
Jonathan Ellis commented on CASSANDRA-2917: ------------------------------------------- Thanks for the patch, Sam! I think that like the bootstrap token calculator we want to skip the System keyspace here. I've added a followup patch that does that over on https://github.com/jbellis/cassandra/tree/2917, with some refactoring to use the more-efficient CFS.keySamples method. What do you think? (P.S. As a style note, I also dropped the Transform business -- while I'm a fan of functional programmming, it's not always a great fit in Java and for simple cases like this is substantially more verbose than the imperative version.) > expose calculate midrange for token in jmx > ------------------------------------------ > > Key: CASSANDRA-2917 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2917 > Project: Cassandra > Issue Type: Improvement > Reporter: Jackson Chung > Priority: Minor > Labels: lhf > Attachments: trunk-2917.txt > > > currently there is no easy way to get midrange, especially for OPP. For > simplicity, you could call OrderPreservingPartitioner.midpoint(Token, Token), > that gives you a rough estimate (and you'd still need to remove non-utf8 > characters.) > A more accurate but difficult way is to sample the keys in that range and > pick the midpoint of those. We should expose that via jmx, because without > this, supporting OPP w/o this is quite challenging. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira