Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 94577 invoked from network); 3 Jul 2010 07:18:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Jul 2010 07:18:08 -0000 Received: (qmail 43025 invoked by uid 500); 3 Jul 2010 07:18:06 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 42845 invoked by uid 500); 3 Jul 2010 07:18:04 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 42836 invoked by uid 99); 3 Jul 2010 07:18:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Jul 2010 07:18:03 +0000 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: local policy) Received: from [62.149.9.24] (HELO dragon.mykola.org) (62.149.9.24) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Jul 2010 07:17:55 +0000 Received: from macbook-pro-user-2.local (SOL-FTTB.122.67.27.94.sovam.net.ua [94.27.67.122] (may be forged)) (authenticated bits=0) by dragon.mykola.org (8.14.3/8.14.3) with ESMTP id o637HXeI076666 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Sat, 3 Jul 2010 10:17:35 +0300 (EEST) (envelope-from nick@mykola.org) Message-ID: <4C2EE408.5060802@mykola.org> Date: Sat, 03 Jul 2010 10:17:28 +0300 From: =?UTF-8?B?0JzQuNC60L7Qu9CwINCh0YLRgNGU0LHQutC+0LI=?= User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: user@cassandra.apache.org Subject: Re: Storing application logs into Cassandra / design question References: In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 02.07.10 16:10, yaw wrote: > Hi all, > I'd like to store logs of my application into cassandra. > > I need to query logs by date (last X logs) or user (give me last X logs > for user Y ) and I want to dispatch data among several servers. > > > I think the best design way is following : > > Each log identifier is a time based UUID. > > > A CF with key = UUID / *Random Partitioner* will contain log message > => allows me to split real data evenly between nodes > > A CF with key = UUID and *order*-*preserving partitioner * allow me to > get last X logs > > A CF with key = userID and columns name are UUIDs (UUID sorted) => > allow me to get last X logs of user Y > > Am I right ? No: you can have only one partitioner per cluster. See: http://ria101.wordpress.com/2010/02/22/cassandra-randompartitioner-vs-orderpreservingpartitioner/ http://arin.me/blog/wtf-is-a-supercolumn-cassandra-data-model -- Mykola Stryebkov Blog: http://mykola.org/blog/ Public key: http://mykola.org/pubkey.txt fpr: 0226 54EE C1FF 8636 36EF 2AC9 BCE9 CFC7 9CF4 6747