Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8706692DD for ; Wed, 8 Feb 2012 23:56:23 +0000 (UTC) Received: (qmail 41669 invoked by uid 500); 8 Feb 2012 23:56:23 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 41642 invoked by uid 500); 8 Feb 2012 23:56:22 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 41634 invoked by uid 99); 8 Feb 2012 23:56:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 23:56:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 23:56:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 733B61ABD07 for ; Wed, 8 Feb 2012 23:55:59 +0000 (UTC) Date: Wed, 8 Feb 2012 23:55:59 +0000 (UTC) From: "Jonathan Ellis (Commented) (JIRA)" To: commits@cassandra.apache.org Message-ID: <1431956550.17366.1328745359473.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1398488262.2139.1311031497697.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CASSANDRA-2917) expose calculate midrange for token in jmx MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CASSANDRA-2917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13204129#comment-13204129 ] Jonathan Ellis commented on CASSANDRA-2917: ------------------------------------------- bq. I agree its very verbose and only went down that route as I saw them used in a few other places in the codebase Sorry about that. :) bq. what's the best branch to work off when creating small patches like this When in doubt, stick with trunk. In this case I'm comfortable committing to 1.1 as well since it's pretty self-contained. > expose calculate midrange for token in jmx > ------------------------------------------ > > Key: CASSANDRA-2917 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2917 > Project: Cassandra > Issue Type: Improvement > Components: Tools > Reporter: Jackson Chung > Assignee: Sam Tunnicliffe > Priority: Minor > Labels: lhf > Fix For: 1.1 > > Attachments: trunk-2917-1.txt, 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