Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 47287 invoked from network); 12 Mar 2009 00:48:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Mar 2009 00:48:35 -0000 Received: (qmail 64084 invoked by uid 500); 12 Mar 2009 00:48:35 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 64069 invoked by uid 500); 12 Mar 2009 00:48:35 -0000 Mailing-List: contact cassandra-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-user@incubator.apache.org Delivered-To: mailing list cassandra-user@incubator.apache.org Received: (qmail 64060 invoked by uid 99); 12 Mar 2009 00:48:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Mar 2009 17:48:34 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbellis@gmail.com designates 209.85.198.243 as permitted sender) Received: from [209.85.198.243] (HELO rv-out-0708.google.com) (209.85.198.243) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Mar 2009 00:48:26 +0000 Received: by rv-out-0708.google.com with SMTP id l33so260885rvb.0 for ; Wed, 11 Mar 2009 17:48:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Na0cwIujjp14qhkFyZ/l7NnNy7/6c0KoFAyPUuXbeZw=; b=Xt+CuWMFLB14YssJ7SgWA32DZOtAmTlNfymUdzzQn8j0pROKqZOBJMSsumlHO43f7B UAivaFxg1qOfP1/8SLE+yRWe8f9TvntRkwm/nmpqPRz/000p81O39tTlHJoOcCc4kYoq CCMOEKXLeDdiO0AwU+DlqRDrnJbzobpb+kFyI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=faGZJ4MSU18fFSmeYov6vsETtuQIGWBPO1JjvWRgQ6hLopadzSr8YwuZewtRoSGVzG j8tbT/+6uRG4gHf35H8z6uWmc5fJiFrSgPHjFFM1N6Ql5NAiyQOr4rOflE/7OybwkfnA VcJMKxmJksFhW9WomifhP1D2e8SxUcjI872i4= MIME-Version: 1.0 Received: by 10.141.211.5 with SMTP id n5mr4665699rvq.279.1236818885791; Wed, 11 Mar 2009 17:48:05 -0700 (PDT) In-Reply-To: References: Date: Wed, 11 Mar 2009 18:48:05 -0600 Message-ID: Subject: Re: OPHF vs. Random From: Jonathan Ellis To: cassandra-user@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Use Random for now. The OPHF is the same as the old one, i.e., not actually OP. :) I'm pretty convinced at this point that it's impossible to have an order-preserving hash that doesn't either (a) impose a relatively short key length past which no partitioning is done (i.e., all keys w/ the same prefix go to the same node) or is (b) very sensitive to key length such that the keys with a given length N will not be evenly distributed across all nodes. Or both. So I am working on migrating from pluggable hash functions key -> BigInteger, to pluggable partitioning algorithms key -> EndPoint. Without the requirement to transform to a numeric value first I think I can create an order-preserving distribution that performs well. (I need this for range queries.) So far I have just laid the foundation, here: https://issues.apache.org/jira/browse/CASSANDRA-3 I hope to finish the rest tomorrow. -Jonathan On Wed, Mar 11, 2009 at 5:28 PM, Jiansheng Huang wrote: > > Which one is better to use? The default is Random. > > In Avinash's annoucement mail, we have > (1) Ability to switch between a random hash and a OPHF. We still have the > old (wrong) OPHF in there. I will update it to the corrected one tomorrow. > > Is correct OPHF in? Thanks. >