Return-Path: Delivered-To: apmail-incubator-cassandra-commits-archive@minotaur.apache.org Received: (qmail 29157 invoked from network); 10 Apr 2009 15:33:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Apr 2009 15:33:36 -0000 Received: (qmail 66969 invoked by uid 500); 10 Apr 2009 15:33:36 -0000 Delivered-To: apmail-incubator-cassandra-commits-archive@incubator.apache.org Received: (qmail 66951 invoked by uid 500); 10 Apr 2009 15:33:36 -0000 Mailing-List: contact cassandra-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-dev@incubator.apache.org Delivered-To: mailing list cassandra-commits@incubator.apache.org Received: (qmail 66941 invoked by uid 99); 10 Apr 2009 15:33:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Apr 2009 15:33:36 +0000 X-ASF-Spam-Status: No, hits=-1999.6 required=10.0 tests=ALL_TRUSTED,SUBJECT_FUZZY_TION X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Apr 2009 15:33:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1879F234C054 for ; Fri, 10 Apr 2009 08:33:15 -0700 (PDT) Message-ID: <468823929.1239377595099.JavaMail.jira@brutus> Date: Fri, 10 Apr 2009 08:33:15 -0700 (PDT) From: "Jonathan Ellis (JIRA)" To: cassandra-commits@incubator.apache.org Subject: [jira] Issue Comment Edited: (CASSANDRA-58) Encapsulate Partitioner logic In-Reply-To: <383752398.1239041533053.JavaMail.jira@brutus> 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-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697367#action_12697367 ] Jonathan Ellis edited comment on CASSANDRA-58 at 4/10/09 8:32 AM: ------------------------------------------------------------------ ... sorry, I am rushing too much and forgot the rest of what you wrote. You're right, the KeyInRanges calls in anticompaction expect an undecorated key. (So that was already broken, pre-58.) I did catch that in #65. I will also fix that in my patch for 67 while waiting for review of 65. was (Author: jbellis): ... sorry, I am rushing too much and forgot the rest of what you wrote. You're right, the KeyInRanges calls expect an undecorated key. (So that was already broken, pre-58.) I will fix that in my patch for 67. > Encapsulate Partitioner logic > ----------------------------- > > Key: CASSANDRA-58 > URL: https://issues.apache.org/jira/browse/CASSANDRA-58 > Project: Cassandra > Issue Type: Improvement > Reporter: Jonathan Ellis > Attachments: 0002-consolidate-partition-behavior-in-IPartitioner-so-c.patch, CASSANDRA-58-v2.patch > > > the codebase is littered with if statements like this > PartitionerType pType = StorageService.getPartitionerType(); > switch( pType ) > { > case OPHF: > // code for order-preserving hash > break; > > default: > // code for random hash > break; > } > We want to move all of those if statements into Partitioner methods to make maintenance easier and to better ensure correctness. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.